0.0
No commit activity in last 3 years
No release in over 3 years
client library for accessing the upscrn api
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.0.0
~> 1.6.4
>= 0
~> 2.3.0

Runtime

 Project Readme

upscrn-client

This is a client for the upscrn api.

Usage

====== OLD VERSION (before 0.2.0)====== Get the api token from upscrn.com.

Upload a screenshot with:

Upscrn::Client.upload_screenshot(filename, auth_token)

To upload a screenshot to a specific project, use:

Upscrn::Client.upload_screenshot(filename, auth_token, :project_id => 12345)

For a list of a user's projects, use:

 Upscrn::Client.projects(auth_token)

====== NEW VERSION (since 0.2.0) ======

How To use

You can set the auth token in two ways

Config:

Upscrn::Client.config do |config|
  config.auth_token = 'your_auth_token'
end

Initialization:

client = Upscrn::Client.new('your_auth_token')

Projects:

List all projects:

client.projects(:all => true).get

client.projects(:page => 2).get

Get a project:

client.project(project_id).get

Create a project:

client.projects(:project => {:name => 'test'}).post

Edit a project:

client.projects(project_id , :project => {:name => 'edited'}).put

Screenshots:

List all Screeshots

client.screenshots(:all => true).get
client.screenshots(:page => 2).get

List all Screeshots in a Project

client.project(project_id).screenshots(:all => true).get
client.project(project_id).screenshots(:page => 2).get

Create a Screenshot:

client.screenshots(:screenshot => {:image => File.open('path/to/image')}).get

Create a Screenshot in a Project:

client.project(project_id).screenshots(:screenshot => {:title => 'title',:image => File.open('path/to/image')}).post

Get a Screenshot

client.screenshot(screenshot_id).get
client.project(project_id).screenshot(screenshot_id).get

Create a Comment on a screenshot

client.project(project_id).screenshot(screenshot_id).comment(:comment => {:body => 'comment'}).post

List all comments on a screenshot

client.project(project_id).screenshot(screenshot_id).comments.post

List all versions on a screenshot

client.project(project_id).screenshot(screenshot_id).versions.post

Create a Version on a screenshot

client.project(project_id).screenshot(screenshot_id).version(:screenshot => {:title => 'title',:image => File.open('path/to/image')}).post

Videos:

List all Videos

client.videos(:all => true).get
client.videos(:page => 2).get

List all Videos in a Project

client.project(project_id).videos(:all => true).get
client.project(project_id).videos(:page => 2).get

Create a Video:

client.videos(:video => {:image => File.open('path/to/image')}).get

Create a Video in a Project:

client.project(project_id).videos(:video => {:title => 'title',:file => File.open('path/to/image')}).post

Get a Video

client.video(video_id).get
client.project(project_id).video(video_id).get

Create a Comment on a Video

client.project(project_id).video(video_id).comment(:comment => {:body => 'comment'}).post

List all comments on a Video

client.project(project_id).video(video_id).comments.post

List all versions on a Video

client.project(project_id).video(video_id).versions.post

Create a Version on a Video

client.project(project_id).video(video_id).version(:video => {:title => 'title',:file => File.open('path/to/image')}).post

Contributing to upscrn-client

  • Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
  • Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
  • Fork the project
  • Start a feature/bugfix branch
  • Commit and push until you are happy with your contribution
  • Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

Copyright

Copyright (c) 2011 Yeti Media. See LICENSE.txt for further details.