deviantart 0.3.8.1 → 0.3.8.2
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.
- checksums.yaml +5 -5
- data/.gitignore +2 -0
- data/.jrubyrc +1 -1
- data/.travis.yml +9 -4
- data/appveyor.yml +1 -1
- data/deviantart.gemspec +1 -1
- data/lib/deviantart/artist_specialty.rb +2 -0
- data/lib/deviantart/authorization_code.rb +2 -0
- data/lib/deviantart/authorization_code/access_token.rb +2 -0
- data/lib/deviantart/base.rb +3 -0
- data/lib/deviantart/client_credentials.rb +3 -1
- data/lib/deviantart/country_id.rb +4 -2
- data/lib/deviantart/data.rb +1 -1
- data/lib/deviantart/deviation.rb +75 -0
- data/lib/deviantart/error.rb +23 -0
- data/lib/deviantart/feed.rb +1 -1
- data/lib/deviantart/gallery/all.rb +10 -0
- data/lib/deviantart/status.rb +27 -0
- data/lib/deviantart/user.rb +27 -0
- data/lib/deviantart/user/damn_token.rb +3 -0
- data/lib/deviantart/user/friends.rb +10 -0
- data/lib/deviantart/user/profile.rb +54 -0
- data/lib/deviantart/user/statuses.rb +10 -0
- data/lib/deviantart/user/update_profile.rb +3 -0
- data/lib/deviantart/user/watchers.rb +10 -0
- data/lib/deviantart/user/whois.rb +3 -0
- data/lib/deviantart/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 39141696ce4e579fd78b33dc781291f5afd01cdc06527e30ad28823fb79139e4
|
|
4
|
+
data.tar.gz: f80ca5b3219b9956f80f15c0c90facc699225620061abf8985afb92740ebd57f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 15b753ac4d613b369d9f9ce9b16fa17c4bf6fccf44d998869b857e659167f2089af8df63d95e2362fc793da4e7f7282d0cf7f766891585fa1473c1d94ffee7f6
|
|
7
|
+
data.tar.gz: efa9f71492b19a0ac5c5953dc1cebffa3999dd3ffbe3fe314023022365e7b986c8711023fa4664178accc14cfe20c76fc0d2873d3b6f10b5441219a4fc84ce6e
|
data/.gitignore
CHANGED
data/.jrubyrc
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
compat.version=2.
|
|
1
|
+
compat.version=2.3
|
data/.travis.yml
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
language: ruby
|
|
3
3
|
rvm:
|
|
4
|
-
- 2.2.
|
|
5
|
-
- 2.3.
|
|
6
|
-
- 2.4.
|
|
7
|
-
-
|
|
4
|
+
- 2.2.9
|
|
5
|
+
- 2.3.6
|
|
6
|
+
- 2.4.3
|
|
7
|
+
- 2.5.0
|
|
8
|
+
- ruby-head
|
|
9
|
+
- jruby-9.1.15.0
|
|
10
|
+
before_install:
|
|
11
|
+
- gem update --system
|
|
12
|
+
- gem update bundler
|
|
8
13
|
script: bundle exec rake test
|
data/appveyor.yml
CHANGED
data/deviantart.gemspec
CHANGED
|
@@ -22,7 +22,7 @@ with some tokens from OAuth API.
|
|
|
22
22
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
23
23
|
spec.require_paths = ['lib']
|
|
24
24
|
|
|
25
|
-
spec.required_ruby_version = Gem::Requirement.new('>= 2.2
|
|
25
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 2.2')
|
|
26
26
|
|
|
27
27
|
spec.add_development_dependency 'bundler'
|
|
28
28
|
spec.add_development_dependency 'rake'
|
data/lib/deviantart/base.rb
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
module DeviantArt
|
|
2
|
+
##
|
|
3
|
+
# Client ID for user profile
|
|
2
4
|
module CountryID
|
|
3
5
|
Unspecified = 0
|
|
4
6
|
UnitedStates = 1
|
|
@@ -180,7 +182,7 @@ module DeviantArt
|
|
|
180
182
|
Portugal = 172
|
|
181
183
|
PuertoRico = 173
|
|
182
184
|
Qatar = 174
|
|
183
|
-
|
|
185
|
+
Reunion = 175
|
|
184
186
|
Romania = 176
|
|
185
187
|
Russia = 177
|
|
186
188
|
Rwanda = 178
|
|
@@ -191,7 +193,7 @@ module DeviantArt
|
|
|
191
193
|
SaintVincentAndTheGrenadines = 182
|
|
192
194
|
Samoa = 183
|
|
193
195
|
SanMarino = 184
|
|
194
|
-
|
|
196
|
+
SaoTomeAndPrincipe = 185
|
|
195
197
|
SaudiArabia = 186
|
|
196
198
|
Senegal = 187
|
|
197
199
|
Serbia = 234
|
data/lib/deviantart/data.rb
CHANGED
data/lib/deviantart/deviation.rb
CHANGED
|
@@ -2,6 +2,81 @@ require 'deviantart/base'
|
|
|
2
2
|
|
|
3
3
|
module DeviantArt
|
|
4
4
|
class Deviation < Base
|
|
5
|
+
# :method: deviationid
|
|
6
|
+
# An UUID for deviation
|
|
7
|
+
|
|
8
|
+
# :method: printid
|
|
9
|
+
#
|
|
10
|
+
|
|
11
|
+
# :method: url
|
|
12
|
+
# The URL for deviation
|
|
13
|
+
|
|
14
|
+
# :method: title
|
|
15
|
+
# The title of deviation
|
|
16
|
+
|
|
17
|
+
# :method: category
|
|
18
|
+
#
|
|
19
|
+
|
|
20
|
+
# :method: category_path
|
|
21
|
+
#
|
|
22
|
+
|
|
23
|
+
# :method: is_favourited
|
|
24
|
+
#
|
|
25
|
+
|
|
26
|
+
# :method: is_deleted
|
|
27
|
+
# The flag for what the deviation is deleted
|
|
28
|
+
|
|
29
|
+
# :method: author
|
|
30
|
+
# The author of this deviation as DeviantArt::User
|
|
31
|
+
|
|
32
|
+
# :method: stats
|
|
33
|
+
#
|
|
34
|
+
|
|
35
|
+
# :method: published_time
|
|
36
|
+
#
|
|
37
|
+
|
|
38
|
+
# :method: allows_comments
|
|
39
|
+
#
|
|
40
|
+
|
|
41
|
+
# :method: preview
|
|
42
|
+
#
|
|
43
|
+
|
|
44
|
+
# :method: content
|
|
45
|
+
#
|
|
46
|
+
|
|
47
|
+
# :method: thumbs
|
|
48
|
+
#
|
|
49
|
+
|
|
50
|
+
# :method: videos
|
|
51
|
+
#
|
|
52
|
+
|
|
53
|
+
# :method: flash
|
|
54
|
+
#
|
|
55
|
+
|
|
56
|
+
# :method: daily_deviation
|
|
57
|
+
#
|
|
58
|
+
|
|
59
|
+
# :method: excerpt
|
|
60
|
+
#
|
|
61
|
+
|
|
62
|
+
# :method: is_mature
|
|
63
|
+
# Is this mature content?
|
|
64
|
+
|
|
65
|
+
# :method: is_downloadable
|
|
66
|
+
#
|
|
67
|
+
|
|
68
|
+
# :method: download_filesize
|
|
69
|
+
#
|
|
70
|
+
|
|
71
|
+
# :method: challenge
|
|
72
|
+
#
|
|
73
|
+
|
|
74
|
+
# :method: challenge_entry
|
|
75
|
+
#
|
|
76
|
+
|
|
77
|
+
# :method: motion_book
|
|
78
|
+
#
|
|
79
|
+
|
|
5
80
|
attr_accessor :deviationid, :printid, :url, :title, :category, :category_path, :is_favourited, :is_deleted, :author, :stats
|
|
6
81
|
attr_accessor :published_time, :allows_comments, :preview, :content, :thumbs, :videos, :flash, :daily_deviation
|
|
7
82
|
attr_accessor :excerpt, :is_mature, :is_downloadable, :download_filesize, :challenge, :challenge_entry, :motion_book
|
data/lib/deviantart/error.rb
CHANGED
|
@@ -2,6 +2,29 @@ require 'deviantart/base'
|
|
|
2
2
|
|
|
3
3
|
module DeviantArt
|
|
4
4
|
class Error < Base
|
|
5
|
+
# :method: error
|
|
6
|
+
# Error type in JSON.
|
|
7
|
+
# For example: +invalid_request+, +unauthorized+ and +server_error+
|
|
8
|
+
|
|
9
|
+
# :method: error_description
|
|
10
|
+
# The error message. You should NOT parse this as it may change, use error
|
|
11
|
+
# or +error_code+ for conditional logic within your app.
|
|
12
|
+
|
|
13
|
+
# :method: error_details
|
|
14
|
+
# Optional.
|
|
15
|
+
# For validation errors, this will be a key/value map containing error
|
|
16
|
+
# information for each field.
|
|
17
|
+
|
|
18
|
+
# :method: error_code
|
|
19
|
+
# Optional.
|
|
20
|
+
# Some endpoints may provide additional error codes so your application
|
|
21
|
+
# can provide fine grained handling of the error states. Each endpoint
|
|
22
|
+
# will define any additional codes in its documentation, all codes start
|
|
23
|
+
# from zero and are specific to that particular endpoint.
|
|
24
|
+
|
|
25
|
+
# :method: status_code
|
|
26
|
+
# This is the HTTP status code of response.
|
|
27
|
+
|
|
5
28
|
attr_accessor :error, :error_description, :error_details, :error_code, :status_code
|
|
6
29
|
|
|
7
30
|
def initialize(json, status_code)
|
data/lib/deviantart/feed.rb
CHANGED
|
@@ -2,6 +2,16 @@ require 'deviantart/base'
|
|
|
2
2
|
|
|
3
3
|
module DeviantArt
|
|
4
4
|
class Gallery::All < Base
|
|
5
|
+
# :method: has_more
|
|
6
|
+
# Boolean field, indicating whether or not there is more data available.
|
|
7
|
+
|
|
8
|
+
# :method: next_offset
|
|
9
|
+
# To fetch the next page of data, send the value of this field as an
|
|
10
|
+
# offset or cursor to the endpoint.
|
|
11
|
+
|
|
12
|
+
# :method: results
|
|
13
|
+
# Deviations list as DeviantArt::Deviation.
|
|
14
|
+
|
|
5
15
|
attr_accessor :has_more, :next_offset, :results
|
|
6
16
|
point_to_class [:results, :[]], DeviantArt::Deviation
|
|
7
17
|
end
|
data/lib/deviantart/status.rb
CHANGED
|
@@ -2,6 +2,33 @@ require 'deviantart/base'
|
|
|
2
2
|
|
|
3
3
|
module DeviantArt
|
|
4
4
|
class Status < Base
|
|
5
|
+
# :method: statusid
|
|
6
|
+
# An UUID for status
|
|
7
|
+
|
|
8
|
+
# :method: body
|
|
9
|
+
# Message body
|
|
10
|
+
|
|
11
|
+
# :method: ts
|
|
12
|
+
#
|
|
13
|
+
|
|
14
|
+
# :method: url
|
|
15
|
+
# An URL for status
|
|
16
|
+
|
|
17
|
+
# :method: comments_count
|
|
18
|
+
#
|
|
19
|
+
|
|
20
|
+
# :method: is_share
|
|
21
|
+
#
|
|
22
|
+
|
|
23
|
+
# :method: is_deleted
|
|
24
|
+
# Deleted flag
|
|
25
|
+
|
|
26
|
+
# :method: author
|
|
27
|
+
# An author name
|
|
28
|
+
|
|
29
|
+
# :method: items
|
|
30
|
+
#
|
|
31
|
+
|
|
5
32
|
attr_accessor :statusid, :body, :ts, :url, :comments_count, :is_share, :is_deleted, :author, :items
|
|
6
33
|
point_to_class [:author], DeviantArt::User
|
|
7
34
|
point_to_class [:items, :[], :status], DeviantArt::Status
|
data/lib/deviantart/user.rb
CHANGED
|
@@ -2,6 +2,33 @@ require 'deviantart/base'
|
|
|
2
2
|
|
|
3
3
|
module DeviantArt
|
|
4
4
|
class User < Base
|
|
5
|
+
# :method: userid
|
|
6
|
+
# The user's ID as UUID, for example 80D3D72E-1B28-4F15-E529-A2EADB60B093.
|
|
7
|
+
|
|
8
|
+
# :method: username
|
|
9
|
+
# The user's name, for example aycabta.
|
|
10
|
+
|
|
11
|
+
# :method: usericon
|
|
12
|
+
# The user's icon URL.
|
|
13
|
+
|
|
14
|
+
# :method: type
|
|
15
|
+
# It'll get "regular" or ...?
|
|
16
|
+
|
|
17
|
+
# :method: is_watching
|
|
18
|
+
# Is authorized user watching the user?
|
|
19
|
+
|
|
20
|
+
# :method: details
|
|
21
|
+
# Some values; age, joindate and sex.
|
|
22
|
+
|
|
23
|
+
# :method: geo
|
|
24
|
+
# Some values; country, countryid and timezone.
|
|
25
|
+
|
|
26
|
+
# :method: profile
|
|
27
|
+
# Some values; artist_level, artist_speciality, cover_photo, real_name, tagline, user_is_artist, profile_pic and website.
|
|
28
|
+
|
|
29
|
+
# :method: stats
|
|
30
|
+
# Some values; friends and watchers.
|
|
31
|
+
|
|
5
32
|
attr_accessor :userid, :username, :usericon, :type, :is_watching, :details, :geo, :profile, :stats
|
|
6
33
|
point_to_class [:profile, :profile_pic], DeviantArt::Deviation
|
|
7
34
|
|
|
@@ -2,6 +2,16 @@ require 'deviantart/base'
|
|
|
2
2
|
|
|
3
3
|
module DeviantArt
|
|
4
4
|
class User::Friends < Base
|
|
5
|
+
# :method: has_more
|
|
6
|
+
# Boolean field, indicating whether or not there is more data available.
|
|
7
|
+
|
|
8
|
+
# :method: next_offset
|
|
9
|
+
# To fetch the next page of data, send the value of this field as an
|
|
10
|
+
# offset or cursor to the endpoint.
|
|
11
|
+
|
|
12
|
+
# :method: results
|
|
13
|
+
# Friends list as DeviantArt::User.
|
|
14
|
+
|
|
5
15
|
attr_accessor :has_more, :next_offset, :results
|
|
6
16
|
point_to_class [:results, :[], :user], DeviantArt::User
|
|
7
17
|
end
|
|
@@ -2,6 +2,60 @@ require 'deviantart/base'
|
|
|
2
2
|
|
|
3
3
|
module DeviantArt
|
|
4
4
|
class User::Profile < Base
|
|
5
|
+
# :method: user
|
|
6
|
+
#
|
|
7
|
+
|
|
8
|
+
# :method: is_watching
|
|
9
|
+
#
|
|
10
|
+
|
|
11
|
+
# :method: profile_url
|
|
12
|
+
#
|
|
13
|
+
|
|
14
|
+
# :method: user_is_artist
|
|
15
|
+
#
|
|
16
|
+
|
|
17
|
+
# :method: artist_level
|
|
18
|
+
#
|
|
19
|
+
|
|
20
|
+
# :method: artist_specialty
|
|
21
|
+
#
|
|
22
|
+
|
|
23
|
+
# :method: real_name
|
|
24
|
+
#
|
|
25
|
+
|
|
26
|
+
# :method: tagline
|
|
27
|
+
#
|
|
28
|
+
|
|
29
|
+
# :method: countryid
|
|
30
|
+
#
|
|
31
|
+
|
|
32
|
+
# :method: country
|
|
33
|
+
#
|
|
34
|
+
|
|
35
|
+
# :method: website
|
|
36
|
+
#
|
|
37
|
+
|
|
38
|
+
# :method: bio
|
|
39
|
+
#
|
|
40
|
+
|
|
41
|
+
# :method: cover_photo
|
|
42
|
+
#
|
|
43
|
+
|
|
44
|
+
# :method: profile_pic
|
|
45
|
+
#
|
|
46
|
+
|
|
47
|
+
# :method: last_status
|
|
48
|
+
#
|
|
49
|
+
|
|
50
|
+
# :method: stats
|
|
51
|
+
#
|
|
52
|
+
|
|
53
|
+
# :method: collections
|
|
54
|
+
#
|
|
55
|
+
|
|
56
|
+
# :method: galleries
|
|
57
|
+
#
|
|
58
|
+
|
|
5
59
|
attr_accessor :user, :is_watching, :profile_url, :user_is_artist, :artist_level, :artist_specialty, :real_name, :tagline
|
|
6
60
|
attr_accessor :countryid, :country, :website, :bio, :cover_photo, :profile_pic, :last_status, :stats, :collections, :galleries
|
|
7
61
|
point_to_class [:user], DeviantArt::User
|
|
@@ -2,6 +2,16 @@ require 'deviantart/base'
|
|
|
2
2
|
|
|
3
3
|
module DeviantArt
|
|
4
4
|
class User::Statuses < Base
|
|
5
|
+
# :method: has_more
|
|
6
|
+
# Boolean field, indicating whether or not there is more data available.
|
|
7
|
+
|
|
8
|
+
# :method: next_offset
|
|
9
|
+
# To fetch the next page of data, send the value of this field as an
|
|
10
|
+
# offset or cursor to the endpoint.
|
|
11
|
+
|
|
12
|
+
# :method: results
|
|
13
|
+
# Statuses list as DeviantArt::Status.
|
|
14
|
+
|
|
5
15
|
attr_accessor :has_more, :next_offset, :results
|
|
6
16
|
point_to_class [:results, :[]], DeviantArt::Status
|
|
7
17
|
end
|
|
@@ -2,6 +2,16 @@ require 'deviantart/base'
|
|
|
2
2
|
|
|
3
3
|
module DeviantArt
|
|
4
4
|
class User::Watchers < Base
|
|
5
|
+
# :method: has_more
|
|
6
|
+
# Boolean field, indicating whether or not there is more data available.
|
|
7
|
+
|
|
8
|
+
# :method: next_offset
|
|
9
|
+
# To fetch the next page of data, send the value of this field as an
|
|
10
|
+
# offset or cursor to the endpoint.
|
|
11
|
+
|
|
12
|
+
# :method: results
|
|
13
|
+
# Watchers list as DeviantArt::User.
|
|
14
|
+
|
|
5
15
|
attr_accessor :has_more, :next_offset, :results
|
|
6
16
|
point_to_class [:results, :[], :user], DeviantArt::User
|
|
7
17
|
end
|
data/lib/deviantart/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: deviantart
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.8.
|
|
4
|
+
version: 0.3.8.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Code Ass
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2018-01-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -224,7 +224,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
224
224
|
requirements:
|
|
225
225
|
- - ">="
|
|
226
226
|
- !ruby/object:Gem::Version
|
|
227
|
-
version: 2.2
|
|
227
|
+
version: '2.2'
|
|
228
228
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
229
229
|
requirements:
|
|
230
230
|
- - ">="
|
|
@@ -232,7 +232,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
232
232
|
version: '0'
|
|
233
233
|
requirements: []
|
|
234
234
|
rubyforge_project:
|
|
235
|
-
rubygems_version: 2.
|
|
235
|
+
rubygems_version: 2.7.3
|
|
236
236
|
signing_key:
|
|
237
237
|
specification_version: 4
|
|
238
238
|
summary: deviantART API library
|