thingiverse 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -16,7 +16,7 @@ This will take a temp code and do the oauth to access_token for you.
16
16
 
17
17
  require 'thingiverse'
18
18
  tv = Thingiverse::Connection.new(client_id, client_secret, code)
19
- puts tv.newest.first.name
19
+ puts tv.things.newest.first.name
20
20
 
21
21
  If you already have an access_token you can just do this.
22
22
 
data/lib/thingiverse.rb CHANGED
@@ -16,5 +16,5 @@ require 'thingiverse/categories'
16
16
  require 'thingiverse/tags'
17
17
 
18
18
  module Thingiverse
19
- VERSION = '0.0.5'
19
+ VERSION = '0.0.6'
20
20
  end
@@ -39,7 +39,7 @@ module Thingiverse
39
39
 
40
40
  response = CGI::parse(auth_response.parsed_response)
41
41
 
42
- @access_token = response['access_token'].to_s
42
+ @access_token = response['access_token'].first.to_s
43
43
 
44
44
  self.class.headers "Authorization" => "Bearer #{@access_token}"
45
45
 
@@ -3,9 +3,9 @@ module Thingiverse
3
3
  include ActiveModel::Validations
4
4
  validates_presence_of :name
5
5
 
6
- attr_accessor :id, :name, :thumbnail, :url, :public_url, :bio, :location, :registered, :last_active
7
- attr_accessor :email, :default_license
8
- attr_accessor :things_url, :copies_url, :likes_url
6
+ attr_accessor :id, :name, :full_name, :thumbnail, :url, :public_url, :bio, :location, :registered, :last_active
7
+ attr_accessor :email, :default_license, :is_following
8
+ attr_accessor :things_url, :copies_url, :likes_url, :downloads_url, :collections_url
9
9
 
10
10
  def initialize(attributes={})
11
11
  attributes.each do |name, value|
@@ -17,6 +17,7 @@ module Thingiverse
17
17
  {
18
18
  :id => id,
19
19
  :name => name,
20
+ :full_name => full_name,
20
21
  :thumbnail => thumbnail,
21
22
  :url => url,
22
23
  :public_url => public_url,
@@ -28,7 +29,10 @@ module Thingiverse
28
29
  :copies_url => copies_url,
29
30
  :likes_url => likes_url,
30
31
  :email => email,
31
- :default_license => default_license
32
+ :default_license => default_license,
33
+ :downloads_url => downloads_url,
34
+ :collections_url => collections_url,
35
+ :is_following => is_following
32
36
  }
33
37
  end
34
38
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thingiverse
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 5
10
- version: 0.0.5
9
+ - 6
10
+ version: 0.0.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Tony Buser
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2013-02-05 00:00:00 Z
18
+ date: 2013-04-15 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: json