bwapi 10.0.0.pre.498 → 10.0.0.pre.500
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/bwapi/client.rb +2 -0
- data/lib/bwapi/client/author.rb +56 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MmZmNWU5OGRmNGVmMjkyYzAyN2JmZTFhYWZmMTIwM2YwMGZlODE1OQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZDA5YWU0YjFiMDk1MDU3ZWM2NDk4NTM2MDhhODJkNzcyOTQ4NjM5YQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NWU0YmU0YzRkZmZjMDUwOGEzODlmYzQwYmZlZjIzYjNkMWNiNTJjYjI3Y2Ey
|
10
|
+
ZDg0YTYwZTY5NDQ5YTg4MTk4NGE0MTk1ZWQwMDUyNGQ4ODNiZWQ2NjAyZGI4
|
11
|
+
MTIyNDBiMzVlZTY1M2UwNmQ4MjE4OTExYmZhYTY5NWRmNmRhOGU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZTIzNzYyYzEzYzQxNGRlMDA4MDkxZjg4MjlkZjBhOTViYzMzNTk3OTU5ZTY3
|
14
|
+
ZGE4MmYwMWU2ZTAxYmU0ZTIzOWZkNTA4NDU0MDkzOTc0M2JhZWUwNDU4ZmU0
|
15
|
+
OWE4YzBlZTNiM2UyOWZkODQ0NmZmNzYyZDQ3OTM0NWJhMjU3OTA=
|
data/lib/bwapi/client.rb
CHANGED
@@ -5,6 +5,7 @@ require 'bwapi/performance'
|
|
5
5
|
|
6
6
|
require 'bwapi/client/admin'
|
7
7
|
require 'bwapi/client/aggregates'
|
8
|
+
require 'bwapi/client/author'
|
8
9
|
require 'bwapi/client/brandwatch'
|
9
10
|
require 'bwapi/client/client'
|
10
11
|
require 'bwapi/client/command_center'
|
@@ -34,6 +35,7 @@ module BWAPI
|
|
34
35
|
|
35
36
|
include BWAPI::Client::Admin
|
36
37
|
include BWAPI::Client::Aggregates
|
38
|
+
include BWAPI::Client::Author
|
37
39
|
include BWAPI::Client::Brandwatch
|
38
40
|
include BWAPI::Client::Client
|
39
41
|
include BWAPI::Client::CommandCenter
|
@@ -0,0 +1,56 @@
|
|
1
|
+
module BWAPI
|
2
|
+
class Client
|
3
|
+
# Author module for author endpoints
|
4
|
+
module Author
|
5
|
+
# Gets all author professions
|
6
|
+
#
|
7
|
+
# @param opts [Hash] options hash of parameters
|
8
|
+
# @option opts [Integer] page Page of results to retrieve
|
9
|
+
# @option opts [Integer] pageSize Results per page of results
|
10
|
+
# @return [Hash] All author professions
|
11
|
+
def author_professions(opts = {})
|
12
|
+
get 'authors/professions', opts
|
13
|
+
end
|
14
|
+
|
15
|
+
# Gets all author interests
|
16
|
+
#
|
17
|
+
# @param opts [Hash] options hash of parameters
|
18
|
+
# @option opts [Integer] page Page of results to retrieve
|
19
|
+
# @option opts [Integer] pageSize Results per page of results
|
20
|
+
# @return [Hash] All author interests
|
21
|
+
def author_interests(opts = {})
|
22
|
+
get 'authors/interests', opts
|
23
|
+
end
|
24
|
+
|
25
|
+
# Get an Author with its associated accounts using an account name/domain tuple
|
26
|
+
#
|
27
|
+
# @param name [String] Account username
|
28
|
+
# @param opts [Hash] options hash of parameters
|
29
|
+
# @option opts [String] domain Account domain
|
30
|
+
# @return [Hash] Author
|
31
|
+
def get_author(name, opts = {})
|
32
|
+
get "authors/#{name}", opts
|
33
|
+
end
|
34
|
+
|
35
|
+
# Update an Author using an account name/domain tuple
|
36
|
+
#
|
37
|
+
# @param name [String] Account username
|
38
|
+
# @param opts [Hash] options hash of parameters
|
39
|
+
# @option opts [String] accountType Account type of Author Patch
|
40
|
+
# @option opts [Array] addInterests Interests to add of Author Patch
|
41
|
+
# @option opts [Array] addProfessions Professions to add of Author Patch
|
42
|
+
# @option opts [String] domain Domain of Author Patch
|
43
|
+
# @option opts [String] gender Gender of Author Patch
|
44
|
+
# @option opts [Integer] projectId Project ID of Author Patch
|
45
|
+
# @option opts [Integer] queryId Query ID of Author Patch
|
46
|
+
# @option opts [Array] removeInterests Interests to remove of Author Patch
|
47
|
+
# @option opts [Array] removeProfessions Professions to remove of Author Patch
|
48
|
+
# @option opts [Integer] resourceId Resource ID of Author Patch
|
49
|
+
# @option opts [String] username Username of Author to be patched
|
50
|
+
# @return [Hash] Updated author
|
51
|
+
def update_author(name, opts = {})
|
52
|
+
patch "authors/#{name}", opts
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bwapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 10.0.0.pre.
|
4
|
+
version: 10.0.0.pre.500
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Chrisp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -150,6 +150,7 @@ files:
|
|
150
150
|
- lib/bwapi/client/admin/clients/users/sharing.rb
|
151
151
|
- lib/bwapi/client/admin/search.rb
|
152
152
|
- lib/bwapi/client/aggregates.rb
|
153
|
+
- lib/bwapi/client/author.rb
|
153
154
|
- lib/bwapi/client/brandwatch.rb
|
154
155
|
- lib/bwapi/client/brandwatch/become.rb
|
155
156
|
- lib/bwapi/client/brandwatch/clients.rb
|