yam 2.3.0 → 2.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/README.md +7 -5
- data/certs/public.pem +18 -17
- data/lib/yammer/api/message.rb +6 -0
- data/lib/yammer/api/user.rb +14 -1
- data/lib/yammer/version.rb +1 -1
- data/spec/api/user_spec.rb +12 -0
- metadata +20 -19
- metadata.gz.sig +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74d3e4f553531f30d4a85cb1147c18faab465c1a
|
4
|
+
data.tar.gz: 8374dbb61db22a253d5f3ef43c9da58b257e438c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a87a7a5e07d71b87e4b231cd7c4d32bdeed8dbdf71b5d9e8093547f12fb973e875ae01d3dfa3d8cd20ee4485f37c60f8123185db18c99361c61865e5ac6ac876
|
7
|
+
data.tar.gz: 0fb9b677253e2805fce39b4a7d9797743c094dfa748a97390be9a9bf467c720a969e1eaa97539012ba9ddc3da9a9181459b2b59792f2846e4152747ddf9ee2fe
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/README.md
CHANGED
@@ -84,7 +84,7 @@ Setup a Yammer client application as described on the [Yammer Developer site](ht
|
|
84
84
|
}
|
85
85
|
```
|
86
86
|
|
87
|
-
### Using
|
87
|
+
### Using Yammer OAuth2 Client to obtain an access token
|
88
88
|
This gem comes bundled with an OAuth2 wrapper that makes provides convenience methods for getting through the OAuth2 flow
|
89
89
|
|
90
90
|
```ruby
|
@@ -128,9 +128,11 @@ authorization_url = yammer_client.webclient_authorization_url(:redirect_uri => '
|
|
128
128
|
# => "https://www.yammer.com/oauth2/authorize/?client_id=PRbTcg9qjgKsp4jjpm1pw&redirect_uri=http%3A%2F%2Flocalhost%2Foauth%2Fcallback&response_type=token"
|
129
129
|
```
|
130
130
|
|
131
|
-
|
131
|
+
### Using Yammer API client to access REST endpoints
|
132
132
|
|
133
|
-
|
133
|
+
#### Configuration
|
134
|
+
|
135
|
+
You can view the current state of the client using the `Yammer#options` method
|
134
136
|
|
135
137
|
```ruby
|
136
138
|
require 'yammer'
|
@@ -139,7 +141,7 @@ Yammer.options
|
|
139
141
|
#> {:site_url=>"https://www.yammer.com", :client_id=>nil, :client_secret=>nil, :access_token=>nil, :http_adapter=>Yammer::Connection, :connection_options=>{:max_redirects=>5, :use_ssl=>true}}
|
140
142
|
```
|
141
143
|
|
142
|
-
|
144
|
+
To change the configuration parameters use the `configure` method
|
143
145
|
|
144
146
|
```ruby
|
145
147
|
Yammer.configure do |c|
|
@@ -180,7 +182,7 @@ Yammer.current_user
|
|
180
182
|
|
181
183
|
### Calling methods on an instance of Yammer::Client
|
182
184
|
NOTE: Use this if you wish to create multiple client instances with diffrent client_id, client_secret and access token.
|
183
|
-
If your application uses a
|
185
|
+
If your application uses a single pair of client_id and client_secret credentials, you ONLY need to specify the access token
|
184
186
|
|
185
187
|
- Create an instance of the Yammer client
|
186
188
|
|
data/certs/public.pem
CHANGED
@@ -1,20 +1,21 @@
|
|
1
1
|
-----BEGIN CERTIFICATE-----
|
2
|
-
|
2
|
+
MIIDcDCCAligAwIBAgIBATANBgkqhkiG9w0BAQUFADA/MREwDwYDVQQDDAh0aWFi
|
3
3
|
YXNuazEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYKCZImiZPyLGQBGRYDY29t
|
4
|
-
|
4
|
+
MB4XDTE0MTExMDIzNDYxNloXDTE1MTExMDIzNDYxNlowPzERMA8GA1UEAwwIdGlh
|
5
5
|
YmFzbmsxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT8ixkARkWA2Nv
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
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CHkZ9gKl4DtoVUo
|
20
|
+
jjKmSHcQ0zdwTZ3XxGdQu48WypU=
|
21
|
+
-----END CERTIFICATE-----
|
data/lib/yammer/api/message.rb
CHANGED
@@ -33,6 +33,12 @@ module Yammer
|
|
33
33
|
# msg1 = Yammer.create_message('what are you workings on?')
|
34
34
|
#
|
35
35
|
# msg2 = Yammer.create_message('building a yammer client', :replied_to_id => msg.id)
|
36
|
+
#
|
37
|
+
# @example Attaching files
|
38
|
+
# file1 = File.open('test1.txt')
|
39
|
+
# file2 = File.open('test2.txt')
|
40
|
+
# msg3 = Yammer.create_message('building a yammer client', :attachment1 => file1, :attachment2 => file2 )
|
41
|
+
#
|
36
42
|
def create_message(body, opts={})
|
37
43
|
opts[:body] = body
|
38
44
|
post("/api/v1/messages", opts)
|
data/lib/yammer/api/user.rb
CHANGED
@@ -163,6 +163,19 @@ module Yammer
|
|
163
163
|
def users_followed_by(id)
|
164
164
|
get("/api/v1/users/followed_by/#{id}")
|
165
165
|
end
|
166
|
+
|
167
|
+
# @rate_limited Yes
|
168
|
+
# @authentication Requires user context
|
169
|
+
# @raise [Yammer::Error::Unauthorized] Error raised when supplied user credentials are not valid.
|
170
|
+
# @return [Yammer::ApiResponse]
|
171
|
+
# @param id [Integer] the ID of the group for which you want to get the members of
|
172
|
+
# @param opts [Hash] A customizable set of opts.
|
173
|
+
# @option opts [Integer] :page
|
174
|
+
# @example Fetch users in a group that the authenticated user is in
|
175
|
+
# Yammer.users_in_group(1)
|
176
|
+
def users_in_group(id, opts={})
|
177
|
+
get("/api/v1/users/in_group/#{id}", opts)
|
178
|
+
end
|
166
179
|
end
|
167
180
|
end
|
168
|
-
end
|
181
|
+
end
|
data/lib/yammer/version.rb
CHANGED
data/spec/api/user_spec.rb
CHANGED
@@ -105,4 +105,16 @@ describe Yammer::Api::User do
|
|
105
105
|
@client.users_followed_by(4)
|
106
106
|
end
|
107
107
|
end
|
108
|
+
|
109
|
+
describe 'users_in_group' do
|
110
|
+
it 'makes an http request without' do
|
111
|
+
@client.should_receive(:get).with('/api/v1/users/in_group/5', {})
|
112
|
+
@client.users_in_group(5)
|
113
|
+
end
|
114
|
+
|
115
|
+
it 'makes an http request with optional parameters' do
|
116
|
+
@client.should_receive(:get).with('/api/v1/users/in_group/5', {:page => 2})
|
117
|
+
@client.users_in_group(5, {:page => 2})
|
118
|
+
end
|
119
|
+
end
|
108
120
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yam
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Mutyaba
|
@@ -10,26 +10,27 @@ bindir: bin
|
|
10
10
|
cert_chain:
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
|
-
|
13
|
+
MIIDcDCCAligAwIBAgIBATANBgkqhkiG9w0BAQUFADA/MREwDwYDVQQDDAh0aWFi
|
14
14
|
YXNuazEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYKCZImiZPyLGQBGRYDY29t
|
15
|
-
|
15
|
+
MB4XDTE0MTExMDIzNDYxNloXDTE1MTExMDIzNDYxNlowPzERMA8GA1UEAwwIdGlh
|
16
16
|
YmFzbmsxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT8ixkARkWA2Nv
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
+
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
17
|
+
bTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL0rWUkIWOqkowk7uTqx
|
18
|
+
ODLUzGbjvzOcUXIsvffq3JysAzaQv0inAsF82yS6OAYiEtYfGgutYnqgMLMo6hdz
|
19
|
+
x/bnLjutMhzFRY3KYk99A+U12xxSh3BScoM1TvV+aCO1zgbiju/Mn69DYKISITn/
|
20
|
+
REcTF6MV3LL89N2/1wJdPkkTju4O4pH94gNcRmmwHEfWTsIQoZB7b+JSvbnuP4DT
|
21
|
+
dsC6ccV3WmzERBVEwVdkzCToXE0x1oBqPvmx+xg/KhtfCB+mEYtFpcxOPOn66QDe
|
22
|
+
WHG/LyutQnv3x9eDC7iEvgngPGPaNj5O9/xsUAdN47Zreaiww7URqpqYHmFhjNcr
|
23
|
+
0YECAwEAAaN3MHUwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0OBBYEFHY+
|
24
|
+
v/ds/CDzG0sCkSJULm6yb1QwMB0GA1UdEQQWMBSBEnRpYWJhc25rQGdtYWlsLmNv
|
25
|
+
bTAdBgNVHRIEFjAUgRJ0aWFiYXNua0BnbWFpbC5jb20wDQYJKoZIhvcNAQEFBQAD
|
26
|
+
ggEBAJO0IJVl6m61//5VBct3c+nAw5O297Vgz/FscdMMYkfTSbPzLVBxnliNToXm
|
27
|
+
BdR/GLbgoncfTaaYiNTJwtitfPAjY51vy47Lb8L+ilMOV5DyNKmbB312QETw2sSc
|
28
|
+
OV6wF8QELWxYRJRyGknim8ldIAeHdLhs/35dnaqfmDY3grZPiqSCXDU13uiYu8z5
|
29
|
+
miqw6vp9DpLxpNZCXqqafBeBvKAq0cFR+5Mf/7zeKdD8ymvWhEcxthAg8IG8vJTI
|
30
|
+
EalsTcGelSol6q0PIaRG2gu/bDlxtAuZOD1i/BaIgoe4GXIZ4CHkZ9gKl4DtoVUo
|
31
|
+
jjKmSHcQ0zdwTZ3XxGdQu48WypU=
|
31
32
|
-----END CERTIFICATE-----
|
32
|
-
date: 2014-
|
33
|
+
date: 2014-11-10 00:00:00.000000000 Z
|
33
34
|
dependencies:
|
34
35
|
- !ruby/object:Gem::Dependency
|
35
36
|
name: oj
|
@@ -285,7 +286,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
285
286
|
version: '0'
|
286
287
|
requirements: []
|
287
288
|
rubyforge_project:
|
288
|
-
rubygems_version: 2.
|
289
|
+
rubygems_version: 2.0.14
|
289
290
|
signing_key:
|
290
291
|
specification_version: 4
|
291
292
|
summary: Yammer API Client
|
metadata.gz.sig
CHANGED
@@ -1 +1,3 @@
|
|
1
|
-
|
1
|
+
�M���[�ɕ*��[~n8���d㷧�i�z(C�����Fڅp-s�ங�Eɹ���c�"�t��K�����Y<���b��$��6����
|
2
|
+
q�Mad
|
3
|
+
uu,R�5S��4���aJw��>������(���Ik3[�5�]B�X���5KϬ�]��I-��"1�\Fg&�3S|c��5���Fx�3��f�N�4��<�)SV-��9삓M[պ�p��/�����k5���s�i[����>�x<��P��
|