behance 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.gitignore CHANGED
@@ -3,6 +3,7 @@
3
3
  .bundle
4
4
  .config
5
5
  .yardoc
6
+ .idea
6
7
  Gemfile.lock
7
8
  InstalledFiles
8
9
  _yardoc
data/README.md CHANGED
@@ -81,6 +81,14 @@ Once you get it, you'll be able to start playing
81
81
  $ client.user_appreciations(920309)
82
82
  $ client.user_appreciations("jonkap1")
83
83
 
84
+ [Get a list of a user's collections. The user argument can be an ID or username.][user_collections]
85
+
86
+ [user_collections]: http://www.behance.net/dev/api/endpoints/2#users-get-21
87
+
88
+ $ client.user_collections(42)
89
+ $ client.user_collections(42, page: 2)
90
+ $ client.user_collections("rur", page: 2)
91
+
84
92
  ### Works in Progress
85
93
 
86
94
  [Search for works-in-progress][wips]
@@ -98,7 +106,7 @@ Once you get it, you'll be able to start playing
98
106
 
99
107
  [Get information and contents of a revision of a work in progress][wip_revision]
100
108
 
101
- [wip_revison]: http://www.behance.net/dev/api/endpoints/3#work-in-progress-get-7
109
+ [wip_revision]: http://www.behance.net/dev/api/endpoints/3#work-in-progress-get-7
102
110
 
103
111
  $ client.wip_revision(69, 133)
104
112
 
@@ -108,6 +116,28 @@ Once you get it, you'll be able to start playing
108
116
 
109
117
  $ client.wip_revision_comments(69, 133)
110
118
 
119
+ ### Collections
120
+
121
+ [Search for collections][collections]
122
+
123
+ [collections]: http://www.behance.net/dev/api/endpoints/5#collections-get-15
124
+
125
+ $ client.collections
126
+ $ client.collections(time: "today", page: 2)
127
+
128
+ [Get basic information about a collection][collection]
129
+
130
+ [collection]: http://www.behance.net/dev/api/endpoints/5#collections-get-17
131
+
132
+ $ client.collection(5074147)
133
+
134
+ [Get projects from a collection][collection_projects]
135
+
136
+ [collection_projects]: http://www.behance.net/dev/api/endpoints/5#collections-get-19
137
+
138
+ $ client.collection_projects(5074147)
139
+ $ client.collection_projects(5074147, page: 2)
140
+
111
141
  ## Contributing
112
142
 
113
143
  1. Fork it
data/behance.gemspec CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |gem|
19
19
 
20
20
  gem.add_runtime_dependency 'faraday', '~> 0.8.4'
21
21
  gem.add_runtime_dependency 'faraday_middleware', '~> 0.8'
22
- gem.add_runtime_dependency 'json', '1.7.5'
22
+ gem.add_runtime_dependency 'json', '~> 1.7.7'
23
23
  gem.add_development_dependency 'webmock', '~> 1.8.10'
24
24
  gem.add_development_dependency 'rspec', '~> 2.6'
25
25
  end
@@ -1,6 +1,7 @@
1
1
  require File.expand_path('../project', __FILE__)
2
2
  require File.expand_path('../user', __FILE__)
3
3
  require File.expand_path('../wips', __FILE__)
4
+ require File.expand_path('../collections', __FILE__)
4
5
  require 'faraday'
5
6
  require 'faraday_middleware'
6
7
 
@@ -14,6 +15,7 @@ module Behance
14
15
  include Behance::Client::Project
15
16
  include Behance::Client::User
16
17
  include Behance::Client::Wips
18
+ include Behance::Client::Collections
17
19
 
18
20
  attr_accessor :access_token, :connection
19
21
 
@@ -0,0 +1,58 @@
1
+ # Collections Endpoints.
2
+ module Behance
3
+ class Client
4
+ module Collections
5
+ # Public: Search for collections.
6
+ #
7
+ # options - The Hash of options that the API would expect:
8
+ # :q - Free text query string.
9
+ # :time - Limits the search by time. Possible values: all (default), today, week, month.
10
+ # :page - The page number of the results, always starting
11
+ # with 1.
12
+ # :sort - The order the results are returned in.
13
+ # Possible values: comments (default), views, last_item_added_date.
14
+ #
15
+ # Examples
16
+ #
17
+ # @client.collections
18
+ # @client.collections(q: "candy", time: "month")
19
+ #
20
+ # Returns an array of colelctions in JSON format.
21
+ def collections(options={})
22
+ request("collections", options)["collections"]
23
+ end
24
+
25
+ # Public: Get basic information about a collection.
26
+ #
27
+ # collection - it has to be an ID (Integer).
28
+ #
29
+ # Examples
30
+ #
31
+ # @client.collection(1)
32
+ #
33
+ # Returns a single user object.
34
+ def collection(collection)
35
+ request("collections/#{collection}")["collection"]
36
+ end
37
+
38
+ # Public: Get projects from a collection.
39
+ #
40
+ # collection - it has to be an ID (Integer).
41
+ # options - The Hash of options that the API would expect:
42
+ # :time - Limits the search by time.
43
+ # Possible values: all (default), today, week, month.
44
+ # :page - The page number of the results, always starting
45
+ # with 1.
46
+ #
47
+ # Examples
48
+ #
49
+ # @client.collections_projects(1)
50
+ # @client.collections_projects(1, page: 2)
51
+ #
52
+ # Returns an array of projects published an user in JSON format.
53
+ def collection_projects(collection, options={})
54
+ request("collections/#{collection}/projects", options)["projects"]
55
+ end
56
+ end
57
+ end
58
+ end
data/lib/behance/user.rb CHANGED
@@ -106,6 +106,21 @@ module Behance
106
106
  def user_appreciations(user)
107
107
  request("users/#{user}/appreciations")["appreciations"]
108
108
  end
109
+
110
+ # Public: Get a list of user's public collections.
111
+ #
112
+ # user - can be an ID (Integer) or username (String).
113
+ #
114
+ # Examples
115
+ #
116
+ # @client.user_collections(1)
117
+ # @client.user_collections("foo")
118
+ #
119
+ # Returns an array of user's public collections in JSON
120
+ # format.
121
+ def user_collections(user)
122
+ request("users/#{user}/collections")["collections"]
123
+ end
109
124
  end
110
125
  end
111
126
  end
@@ -1,3 +1,3 @@
1
1
  module Behance
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
@@ -0,0 +1,92 @@
1
+ require 'spec_helper'
2
+
3
+ describe Behance::Client::Collections do
4
+
5
+ before(:all) do
6
+ @client = Behance::Client.new(access_token: "abc123")
7
+ end
8
+
9
+ before do
10
+ @options = { api_key: @client.access_token }
11
+ end
12
+
13
+ describe "#collections" do
14
+ context "without parameters" do
15
+ before do
16
+ stub_get("collections").with(query: @options).
17
+ to_return(body: fixture("collections.json"))
18
+ @collections = @client.collections
19
+ end
20
+
21
+ it "makes a http request" do
22
+ a_get("collections").
23
+ with(query: @options).should have_been_made
24
+ end
25
+
26
+ it "gets an collections list" do
27
+ @collections.size.should == 3
28
+ end
29
+ end
30
+
31
+ context "with parameters" do
32
+ before do
33
+ @options.merge!(q: "-FASHION")
34
+ stub_get("collections").with(query: @options).
35
+ to_return(body: fixture("collections.json"))
36
+ end
37
+
38
+ it "gets an collections list" do
39
+ @collections = @client.collections(@options).size.should == 3
40
+ end
41
+ end
42
+ end
43
+
44
+ describe "#collection" do
45
+ before do
46
+ stub_get("collections/1").with(query: @options).
47
+ to_return(body: fixture("collection.json"))
48
+ @collection = @client.collection(1)
49
+ end
50
+
51
+ it "makes a http request" do
52
+ a_get("collections/1").
53
+ with(query: @options).should have_been_made
54
+ end
55
+
56
+ it "gets a single collection" do
57
+ @collection["id"].should == "4776629"
58
+ end
59
+ end
60
+
61
+ describe "#collection_projects" do
62
+ context "without parameters" do
63
+ before do
64
+ stub_get("collections/1/projects").with(query: @options).
65
+ to_return(body: fixture("collection_projects.json"))
66
+ @projects = @client.collection_projects(1)
67
+ end
68
+
69
+ it "makes a http request" do
70
+ a_get("collections/1/projects").
71
+ with(query: @options).should have_been_made
72
+ end
73
+
74
+ it "gets a list of projects" do
75
+ @projects.size.should == 2
76
+ end
77
+ end
78
+
79
+ context "with parameters" do
80
+ before do
81
+ @options.stub!(page: 1, time: Time.new)
82
+ stub_get("collections/1/projects").with(query: @options).
83
+ to_return(body: fixture("collection_projects.json"))
84
+ end
85
+
86
+ it "gets a list of projects" do
87
+ @projects = @client.collection_projects(1, @options).
88
+ size.should == 2
89
+ end
90
+ end
91
+ end
92
+ end
@@ -138,4 +138,21 @@ describe Behance::Client::User do
138
138
  @appreciations.size.should == 4
139
139
  end
140
140
  end
141
+
142
+ describe "#user_collections" do
143
+ before do
144
+ stub_get("users/1/collections").with(query: @options).
145
+ to_return(body: fixture("user_collections.json"))
146
+ @collections = @client.user_collections(1)
147
+ end
148
+
149
+ it "makes a http request" do
150
+ a_get("users/1/collections").with(query: @options).
151
+ should have_been_made
152
+ end
153
+
154
+ it "gets a list of collections" do
155
+ @collections.size.should == 2
156
+ end
157
+ end
141
158
  end
@@ -0,0 +1,36 @@
1
+ {"collection":{
2
+ "id":"4776629",
3
+ "title":"-FASHION",
4
+ "owners":[
5
+ {
6
+ "id":1545661,
7
+ "first_name":"Ale",
8
+ "last_name":"Corsini",
9
+ "username":"alecorsini",
10
+ "city":"Berlin",
11
+ "state":"",
12
+ "country":"Germany",
13
+ "company":"Ale Corsini | digital filmmaker",
14
+ "occupation":"",
15
+ "created_on":1346604010,
16
+ "url":"http:\/\/www.behance.net\/alecorsini",
17
+ "display_name":"Ale Corsini",
18
+ "images":{
19
+ "32":"http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/32xfe9012188c697ec1d811a074eff535ab.jpg",
20
+ "50":"http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/50xfe9012188c697ec1d811a074eff535ab.jpg",
21
+ "78":"http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/78xfe9012188c697ec1d811a074eff535ab.jpg",
22
+ "115":"http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/115xfe9012188c697ec1d811a074eff535ab.jpg",
23
+ "129":"http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/129xfe9012188c697ec1d811a074eff535ab.jpg",
24
+ "138":"http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/fe9012188c697ec1d811a074eff535ab.jpg"
25
+ },
26
+ "fields":["Cinematography", "Directing", "Film"]
27
+ }
28
+ ],
29
+ "stats":{
30
+ "items":2,
31
+ "followers":0
32
+ },
33
+ "images":["http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/projects\/5028817\/7e42a4ad2685251e95407b5e553d0f7c.jpg", "http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/projects\/5027865\/a8ed0a9f256504150adc1ab258c0ee13.jpg"],
34
+ "created_on":1347901891,
35
+ "modified_on":1347903068
36
+ }}
@@ -0,0 +1,94 @@
1
+ {"projects":[
2
+ {
3
+ "id":5028817,
4
+ "name":"ALL OFF - fashion film",
5
+ "published_on":1346696736,
6
+ "created_on":1346696410,
7
+ "modified_on":1346696736,
8
+ "url":"http:\/\/www.behance.net\/gallery\/ALL-OFF-fashion-film\/5028817",
9
+ "fields":["Cinematography", "Directing", "Fashion"],
10
+ "covers":{
11
+ "115":"http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/projects\/5028817\/115x7e42a4ad2685251e95407b5e553d0f7c.jpg",
12
+ "202":"http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/projects\/5028817\/7e42a4ad2685251e95407b5e553d0f7c.jpg",
13
+ "404":"http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/projects\/5028817\/404x7e42a4ad2685251e95407b5e553d0f7c.jpg",
14
+ "230":"http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/projects\/5028817\/230x7e42a4ad2685251e95407b5e553d0f7c.jpg"
15
+ },
16
+ "mature_content":0,
17
+ "owners":{
18
+ "1545661":{
19
+ "id":1545661,
20
+ "first_name":"Ale",
21
+ "last_name":"Corsini",
22
+ "username":"alecorsini",
23
+ "city":"Berlin",
24
+ "state":"",
25
+ "country":"Germany",
26
+ "company":"Ale Corsini | digital filmmaker",
27
+ "occupation":"",
28
+ "created_on":1346604010,
29
+ "url":"http:\/\/www.behance.net\/alecorsini",
30
+ "display_name":"Ale Corsini",
31
+ "images":{
32
+ "32":"http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/32xfe9012188c697ec1d811a074eff535ab.jpg",
33
+ "50":"http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/50xfe9012188c697ec1d811a074eff535ab.jpg",
34
+ "78":"http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/78xfe9012188c697ec1d811a074eff535ab.jpg",
35
+ "115":"http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/115xfe9012188c697ec1d811a074eff535ab.jpg",
36
+ "129":"http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/129xfe9012188c697ec1d811a074eff535ab.jpg",
37
+ "138":"http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/fe9012188c697ec1d811a074eff535ab.jpg"
38
+ },
39
+ "fields":["Cinematography", "Directing", "Film"]
40
+ }
41
+ },
42
+ "stats":{
43
+ "views":22,
44
+ "appreciations":3,
45
+ "comments":0
46
+ }
47
+ },
48
+ {
49
+ "id":5027865,
50
+ "name":"THE RAKE - backstage fashion video",
51
+ "published_on":1346692204,
52
+ "created_on":1346691153,
53
+ "modified_on":1347286210,
54
+ "url":"http:\/\/www.behance.net\/gallery\/THE-RAKE-backstage-fashion-video\/5027865",
55
+ "fields":["Cinematography", "Fashion"],
56
+ "covers":{
57
+ "115":"http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/projects\/5027865\/115xa8ed0a9f256504150adc1ab258c0ee13.jpg",
58
+ "202":"http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/projects\/5027865\/a8ed0a9f256504150adc1ab258c0ee13.jpg",
59
+ "404":"http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/projects\/5027865\/404xa8ed0a9f256504150adc1ab258c0ee13.jpg",
60
+ "230":"http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/projects\/5027865\/230xa8ed0a9f256504150adc1ab258c0ee13.jpg"
61
+ },
62
+ "mature_content":0,
63
+ "owners":{
64
+ "1545661":{
65
+ "id":1545661,
66
+ "first_name":"Ale",
67
+ "last_name":"Corsini",
68
+ "username":"alecorsini",
69
+ "city":"Berlin",
70
+ "state":"",
71
+ "country":"Germany",
72
+ "company":"Ale Corsini | digital filmmaker",
73
+ "occupation":"",
74
+ "created_on":1346604010,
75
+ "url":"http:\/\/www.behance.net\/alecorsini",
76
+ "display_name":"Ale Corsini",
77
+ "images":{
78
+ "32":"http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/32xfe9012188c697ec1d811a074eff535ab.jpg",
79
+ "50":"http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/50xfe9012188c697ec1d811a074eff535ab.jpg",
80
+ "78":"http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/78xfe9012188c697ec1d811a074eff535ab.jpg",
81
+ "115":"http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/115xfe9012188c697ec1d811a074eff535ab.jpg",
82
+ "129":"http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/129xfe9012188c697ec1d811a074eff535ab.jpg",
83
+ "138":"http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/fe9012188c697ec1d811a074eff535ab.jpg"
84
+ },
85
+ "fields":["Cinematography", "Directing", "Film"]
86
+ }
87
+ },
88
+ "stats":{
89
+ "views":24,
90
+ "appreciations":2,
91
+ "comments":0
92
+ }
93
+ }
94
+ ]}
@@ -0,0 +1,110 @@
1
+ {"collections":[
2
+ {
3
+ "id":"4776629",
4
+ "title":"-FASHION",
5
+ "owners":[
6
+ {
7
+ "id":1545661,
8
+ "first_name":"Ale",
9
+ "last_name":"Corsini",
10
+ "username":"alecorsini",
11
+ "city":"Berlin",
12
+ "state":"",
13
+ "country":"Germany",
14
+ "company":"Ale Corsini | digital filmmaker",
15
+ "occupation":"",
16
+ "created_on":1346604010,
17
+ "url":"http:\/\/www.behance.net\/alecorsini",
18
+ "display_name":"Ale Corsini",
19
+ "images":{
20
+ "32":"http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/32xfe9012188c697ec1d811a074eff535ab.jpg",
21
+ "50":"http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/50xfe9012188c697ec1d811a074eff535ab.jpg",
22
+ "78":"http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/78xfe9012188c697ec1d811a074eff535ab.jpg",
23
+ "115":"http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/115xfe9012188c697ec1d811a074eff535ab.jpg",
24
+ "129":"http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/129xfe9012188c697ec1d811a074eff535ab.jpg",
25
+ "138":"http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/fe9012188c697ec1d811a074eff535ab.jpg"
26
+ },
27
+ "fields":["Cinematography", "Directing", "Film"]
28
+ }
29
+ ],
30
+ "stats":{
31
+ "items":2,
32
+ "followers":0
33
+ },
34
+ "images":["http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/projects\/5028817\/7e42a4ad2685251e95407b5e553d0f7c.jpg", "http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/projects\/5027865\/a8ed0a9f256504150adc1ab258c0ee13.jpg"],
35
+ "created_on":1347901891,
36
+ "modified_on":1347903068
37
+ },
38
+ {
39
+ "id":"4776631",
40
+ "title":"-MUSIC",
41
+ "owners":[
42
+ {
43
+ "id":1545661,
44
+ "first_name":"Ale",
45
+ "last_name":"Corsini",
46
+ "username":"alecorsini",
47
+ "city":"Berlin",
48
+ "state":"",
49
+ "country":"Germany",
50
+ "company":"Ale Corsini | digital filmmaker",
51
+ "occupation":"",
52
+ "created_on":1346604010,
53
+ "url":"http:\/\/www.behance.net\/alecorsini",
54
+ "display_name":"Ale Corsini",
55
+ "images":{
56
+ "32":"http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/32xfe9012188c697ec1d811a074eff535ab.jpg",
57
+ "50":"http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/50xfe9012188c697ec1d811a074eff535ab.jpg",
58
+ "78":"http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/78xfe9012188c697ec1d811a074eff535ab.jpg",
59
+ "115":"http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/115xfe9012188c697ec1d811a074eff535ab.jpg",
60
+ "129":"http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/129xfe9012188c697ec1d811a074eff535ab.jpg",
61
+ "138":"http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/fe9012188c697ec1d811a074eff535ab.jpg"
62
+ },
63
+ "fields":["Cinematography", "Directing", "Film"]
64
+ }
65
+ ],
66
+ "stats":{
67
+ "items":1,
68
+ "followers":0
69
+ },
70
+ "images":["http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/projects\/5028653\/7b4c0a2195fe12cad5054e1a8675d7a1.jpg"],
71
+ "created_on":1347901924,
72
+ "modified_on":1347903118
73
+ },
74
+ {
75
+ "id":"4776641",
76
+ "title":"-SOCIAL",
77
+ "owners":[
78
+ {
79
+ "id":1545661,
80
+ "first_name":"Ale",
81
+ "last_name":"Corsini",
82
+ "username":"alecorsini",
83
+ "city":"Berlin",
84
+ "state":"",
85
+ "country":"Germany",
86
+ "company":"Ale Corsini | digital filmmaker",
87
+ "occupation":"",
88
+ "created_on":1346604010,
89
+ "url":"http:\/\/www.behance.net\/alecorsini",
90
+ "display_name":"Ale Corsini",
91
+ "images":{
92
+ "32":"http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/32xfe9012188c697ec1d811a074eff535ab.jpg",
93
+ "50":"http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/50xfe9012188c697ec1d811a074eff535ab.jpg",
94
+ "78":"http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/78xfe9012188c697ec1d811a074eff535ab.jpg",
95
+ "115":"http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/115xfe9012188c697ec1d811a074eff535ab.jpg",
96
+ "129":"http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/129xfe9012188c697ec1d811a074eff535ab.jpg",
97
+ "138":"http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/fe9012188c697ec1d811a074eff535ab.jpg"
98
+ },
99
+ "fields":["Cinematography", "Directing", "Film"]
100
+ }
101
+ ],
102
+ "stats":{
103
+ "items":4,
104
+ "followers":0
105
+ },
106
+ "images":["http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/projects\/5043093\/14aa504fc15636316d044dd25d082f3a.jpg", "http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/projects\/5040093\/2e9a1d70b997b05105defcd4c098ddb5.jpg", "http:\/\/behance.vo.llnwd.net\/profiles17\/1545661\/projects\/5067265\/d95e27e91a0e233750f257f933d0d0e7.jpg"],
107
+ "created_on":1347901956,
108
+ "modified_on":1347903698
109
+ }
110
+ ]}
@@ -0,0 +1,74 @@
1
+ {"collections":[
2
+ {
3
+ "id":"5074147",
4
+ "title":"Commercials",
5
+ "owners":[
6
+ {
7
+ "id":1742931,
8
+ "first_name":"R.U.R.",
9
+ "last_name":"",
10
+ "username":"rur",
11
+ "city":"Prague",
12
+ "state":"",
13
+ "country":"Czech Republic",
14
+ "company":"",
15
+ "occupation":"",
16
+ "created_on":1350976835,
17
+ "url":"http:\/\/www.behance.net\/rur",
18
+ "display_name":"R.U.R.",
19
+ "images":{
20
+ "32":"http:\/\/behance.vo.llnwd.net\/profiles8\/1742931\/32x3658bde838eec0145fb1f35498b1e9a4.jpg",
21
+ "50":"http:\/\/behance.vo.llnwd.net\/profiles8\/1742931\/50x3658bde838eec0145fb1f35498b1e9a4.jpg",
22
+ "78":"http:\/\/behance.vo.llnwd.net\/profiles8\/1742931\/78x3658bde838eec0145fb1f35498b1e9a4.jpg",
23
+ "115":"http:\/\/behance.vo.llnwd.net\/profiles8\/1742931\/115x3658bde838eec0145fb1f35498b1e9a4.jpg",
24
+ "129":"http:\/\/behance.vo.llnwd.net\/profiles8\/1742931\/129x3658bde838eec0145fb1f35498b1e9a4.jpg",
25
+ "138":"http:\/\/behance.vo.llnwd.net\/profiles8\/1742931\/3658bde838eec0145fb1f35498b1e9a4.jpg"
26
+ },
27
+ "fields":["Computer Animation", "Digital Art", "Visual Effects"]
28
+ }
29
+ ],
30
+ "stats":{
31
+ "items":3,
32
+ "followers":0
33
+ },
34
+ "images":["http:\/\/behance.vo.llnwd.net\/profiles8\/1742931\/projects\/5628481\/56183a68ab1929554fbf9b56454bb623.jpg", "http:\/\/behance.vo.llnwd.net\/profiles8\/1742931\/projects\/5628417\/14296c40fd76c0233345956e343705e6.jpg", "http:\/\/behance.vo.llnwd.net\/profiles8\/1742931\/projects\/5627271\/991dd41a8a72c7bc2a6428359ee771bb.jpg"],
35
+ "created_on":1350983251,
36
+ "modified_on":1351240600
37
+ },
38
+ {
39
+ "id":"5074077",
40
+ "title":"Selected",
41
+ "owners":[
42
+ {
43
+ "id":1742931,
44
+ "first_name":"R.U.R.",
45
+ "last_name":"",
46
+ "username":"rur",
47
+ "city":"Prague",
48
+ "state":"",
49
+ "country":"Czech Republic",
50
+ "company":"",
51
+ "occupation":"",
52
+ "created_on":1350976835,
53
+ "url":"http:\/\/www.behance.net\/rur",
54
+ "display_name":"R.U.R.",
55
+ "images":{
56
+ "32":"http:\/\/behance.vo.llnwd.net\/profiles8\/1742931\/32x3658bde838eec0145fb1f35498b1e9a4.jpg",
57
+ "50":"http:\/\/behance.vo.llnwd.net\/profiles8\/1742931\/50x3658bde838eec0145fb1f35498b1e9a4.jpg",
58
+ "78":"http:\/\/behance.vo.llnwd.net\/profiles8\/1742931\/78x3658bde838eec0145fb1f35498b1e9a4.jpg",
59
+ "115":"http:\/\/behance.vo.llnwd.net\/profiles8\/1742931\/115x3658bde838eec0145fb1f35498b1e9a4.jpg",
60
+ "129":"http:\/\/behance.vo.llnwd.net\/profiles8\/1742931\/129x3658bde838eec0145fb1f35498b1e9a4.jpg",
61
+ "138":"http:\/\/behance.vo.llnwd.net\/profiles8\/1742931\/3658bde838eec0145fb1f35498b1e9a4.jpg"
62
+ },
63
+ "fields":["Computer Animation", "Digital Art", "Visual Effects"]
64
+ }
65
+ ],
66
+ "stats":{
67
+ "items":4,
68
+ "followers":0
69
+ },
70
+ "images":["http:\/\/behance.vo.llnwd.net\/profiles8\/1742931\/projects\/5663905\/fea0b279ec17bdb6890430c34b23bd55.jpg", "http:\/\/behance.vo.llnwd.net\/profiles8\/1742931\/projects\/5628481\/56183a68ab1929554fbf9b56454bb623.jpg", "http:\/\/behance.vo.llnwd.net\/profiles8\/1742931\/projects\/5628417\/14296c40fd76c0233345956e343705e6.jpg"],
71
+ "created_on":1350982813,
72
+ "modified_on":1351240641
73
+ }
74
+ ]}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: behance
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-21 00:00:00.000000000 Z
12
+ date: 2013-03-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday
@@ -48,17 +48,17 @@ dependencies:
48
48
  requirement: !ruby/object:Gem::Requirement
49
49
  none: false
50
50
  requirements:
51
- - - '='
51
+ - - ~>
52
52
  - !ruby/object:Gem::Version
53
- version: 1.7.5
53
+ version: 1.7.7
54
54
  type: :runtime
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  none: false
58
58
  requirements:
59
- - - '='
59
+ - - ~>
60
60
  - !ruby/object:Gem::Version
61
- version: 1.7.5
61
+ version: 1.7.7
62
62
  - !ruby/object:Gem::Dependency
63
63
  name: webmock
64
64
  requirement: !ruby/object:Gem::Requirement
@@ -106,19 +106,25 @@ files:
106
106
  - behance.gemspec
107
107
  - lib/behance.rb
108
108
  - lib/behance/client.rb
109
+ - lib/behance/collections.rb
109
110
  - lib/behance/project.rb
110
111
  - lib/behance/user.rb
111
112
  - lib/behance/version.rb
112
113
  - lib/behance/wips.rb
113
114
  - spec/behance/client_spec.rb
115
+ - spec/behance/collections_spec.rb
114
116
  - spec/behance/project_spec.rb
115
117
  - spec/behance/user_spec.rb
116
118
  - spec/behance/wips_spec.rb
119
+ - spec/fixtures/collection.json
120
+ - spec/fixtures/collection_projects.json
121
+ - spec/fixtures/collections.json
117
122
  - spec/fixtures/project.json
118
123
  - spec/fixtures/project_comments.json
119
124
  - spec/fixtures/projects.json
120
125
  - spec/fixtures/user.json
121
126
  - spec/fixtures/user_appreciations.json
127
+ - spec/fixtures/user_collections.json
122
128
  - spec/fixtures/user_projects.json
123
129
  - spec/fixtures/user_wips.json
124
130
  - spec/fixtures/users.json
@@ -153,14 +159,19 @@ specification_version: 3
153
159
  summary: A Ruby wrapper for the Behance API
154
160
  test_files:
155
161
  - spec/behance/client_spec.rb
162
+ - spec/behance/collections_spec.rb
156
163
  - spec/behance/project_spec.rb
157
164
  - spec/behance/user_spec.rb
158
165
  - spec/behance/wips_spec.rb
166
+ - spec/fixtures/collection.json
167
+ - spec/fixtures/collection_projects.json
168
+ - spec/fixtures/collections.json
159
169
  - spec/fixtures/project.json
160
170
  - spec/fixtures/project_comments.json
161
171
  - spec/fixtures/projects.json
162
172
  - spec/fixtures/user.json
163
173
  - spec/fixtures/user_appreciations.json
174
+ - spec/fixtures/user_collections.json
164
175
  - spec/fixtures/user_projects.json
165
176
  - spec/fixtures/user_wips.json
166
177
  - spec/fixtures/users.json