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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aa809413d7a9291efe4669d094af8662f6fc9892
4
- data.tar.gz: c9fb753cce0165376014d48147e853ea409775c6
3
+ metadata.gz: 74d3e4f553531f30d4a85cb1147c18faab465c1a
4
+ data.tar.gz: 8374dbb61db22a253d5f3ef43c9da58b257e438c
5
5
  SHA512:
6
- metadata.gz: 4086614c5f23ada408f3d80e8cbf754879bcf5bad3c0e0063b38b78fc372eeb07448006135faaddda4bbf8ab86030cade2ae3029f4116269c6c66602303cbdcb
7
- data.tar.gz: 8b4c69ad3ee8b4f399e1abe86a9eadd455a5b11874b082df3b096b7fd3ab618c42ccf68954b4aef1fd1dd0d5106be34186f37ecad2a57a3513432a15976651be
6
+ metadata.gz: a87a7a5e07d71b87e4b231cd7c4d32bdeed8dbdf71b5d9e8093547f12fb973e875ae01d3dfa3d8cd20ee4485f37c60f8123185db18c99361c61865e5ac6ac876
7
+ data.tar.gz: 0fb9b677253e2805fce39b4a7d9797743c094dfa748a97390be9a9bf467c720a969e1eaa97539012ba9ddc3da9a9181459b2b59792f2846e4152747ddf9ee2fe
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 bundled Yammer OAuth2 Client
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
- ## Configuring yammer-client
131
+ ### Using Yammer API client to access REST endpoints
132
132
 
133
- To view the current state of the client use the `options` method
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
- You may change this configuration by using the `configure` method
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 signle pair of client_id and client_secret credentials, you ONLY need to sepecify the access token
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
 
@@ -1,20 +1,21 @@
1
1
  -----BEGIN CERTIFICATE-----
2
- MIIDMjCCAhqgAwIBAgIBADANBgkqhkiG9w0BAQUFADA/MREwDwYDVQQDDAh0aWFi
2
+ MIIDcDCCAligAwIBAgIBATANBgkqhkiG9w0BAQUFADA/MREwDwYDVQQDDAh0aWFi
3
3
  YXNuazEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYKCZImiZPyLGQBGRYDY29t
4
- MB4XDTEzMDQyOTA0MTkwMFoXDTE0MDQyOTA0MTkwMFowPzERMA8GA1UEAwwIdGlh
4
+ MB4XDTE0MTExMDIzNDYxNloXDTE1MTExMDIzNDYxNlowPzERMA8GA1UEAwwIdGlh
5
5
  YmFzbmsxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT8ixkARkWA2Nv
6
- bTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMWly4vv32/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V3LL89N2/1wJdPkkTju4O4pH94gNcRmmwHEfWTsIQoZB7b+JSvbnuP4DT
10
+ dsC6ccV3WmzERBVEwVdkzCToXE0x1oBqPvmx+xg/KhtfCB+mEYtFpcxOPOn66QDe
11
+ WHG/LyutQnv3x9eDC7iEvgngPGPaNj5O9/xsUAdN47Zreaiww7URqpqYHmFhjNcr
12
+ 0YECAwEAAaN3MHUwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0OBBYEFHY+
13
+ v/ds/CDzG0sCkSJULm6yb1QwMB0GA1UdEQQWMBSBEnRpYWJhc25rQGdtYWlsLmNv
14
+ bTAdBgNVHRIEFjAUgRJ0aWFiYXNua0BnbWFpbC5jb20wDQYJKoZIhvcNAQEFBQAD
15
+ ggEBAJO0IJVl6m61//5VBct3c+nAw5O297Vgz/FscdMMYkfTSbPzLVBxnliNToXm
16
+ BdR/GLbgoncfTaaYiNTJwtitfPAjY51vy47Lb8L+ilMOV5DyNKmbB312QETw2sSc
17
+ OV6wF8QELWxYRJRyGknim8ldIAeHdLhs/35dnaqfmDY3grZPiqSCXDU13uiYu8z5
18
+ miqw6vp9DpLxpNZCXqqafBeBvKAq0cFR+5Mf/7zeKdD8ymvWhEcxthAg8IG8vJTI
19
+ EalsTcGelSol6q0PIaRG2gu/bDlxtAuZOD1i/BaIgoe4GXIZ4CHkZ9gKl4DtoVUo
20
+ jjKmSHcQ0zdwTZ3XxGdQu48WypU=
21
+ -----END CERTIFICATE-----
@@ -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)
@@ -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
@@ -15,7 +15,7 @@
15
15
  module Yammer
16
16
  class Version
17
17
  MAJOR = 2 unless defined? Yammer::MAJOR
18
- MINOR = 3 unless defined? Yammer::MINOR
18
+ MINOR = 4 unless defined? Yammer::MINOR
19
19
  PATCH = 0 unless defined? Yammer::PATCH
20
20
  PRE = nil unless defined? Yammer::PRE
21
21
 
@@ -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.3.0
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
- MIIDMjCCAhqgAwIBAg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8ymvWhEcxthAg8IG8vJTI
30
+ EalsTcGelSol6q0PIaRG2gu/bDlxtAuZOD1i/BaIgoe4GXIZ4CHkZ9gKl4DtoVUo
31
+ jjKmSHcQ0zdwTZ3XxGdQu48WypU=
31
32
  -----END CERTIFICATE-----
32
- date: 2014-04-02 00:00:00.000000000 Z
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.1.10
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
- ��yL����a��(k��λ�+5���y`�L���O��,cB���jA���CluX;zjd-OQ} ZUM;*D���`�RW�g;��:��V�r��G�\��uĚt�����tw˔&�/i+H���L���C �H�����d��~��ܵ�^��o�h��#>��eo���}ib�?�;錗.F'��Q�mٴ;V���]�3���Ĭ�`�,n�'�O핋�z>1Q3T,���4# `�X���*���� '
1
+ �M���[�ɕ*��[~n8���d㷧�iz(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��