sfdc 3.0.1 → 3.1.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.
- checksums.yaml +4 -4
- data/LICENSE +2 -2
- data/README.md +8 -6
- data/lib/sfdc/concerns/api.rb +13 -0
- data/lib/sfdc/config.rb +1 -1
- data/lib/sfdc/version.rb +1 -1
- data/sfdc-3.0.1.gem +0 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 489a7d94444f62a61fcde3181c4686f5668f868a
|
4
|
+
data.tar.gz: 39641f733d89364aedd2f1ad9d6550f895066063
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed4d97ed76e1c1fd5abdd35a44cd7ebc95633f87d95b1732289bf96e78437d010225ca177be88c25f90c1d82d524dc76a731cbf0af48c919b75b8ea53e3fcae2
|
7
|
+
data.tar.gz: e6340c84ddbc3ef648e8e44ffa835eea092d5a0a24af99849e900de576924e49571a09aa07ccde74a724904d4a1d3f920b5acb1f94412201f3031634b2c887c6
|
data/LICENSE
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
Copyright (c)
|
1
|
+
Copyright (c) 2013 Bruce Yue
|
2
2
|
|
3
|
-
With portions Copyright (c) 2013
|
3
|
+
With portions Copyright (c) 2013 ShareAllTech (http://www.sharealltech.com)
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining
|
6
6
|
a copy of this software and associated documentation files (the
|
data/README.md
CHANGED
@@ -14,6 +14,7 @@ _A ruby gem for the [Salesforce REST api](http://www.salesforce.com/us/developer
|
|
14
14
|
- Support for [custom Apex REST endpoints](#custom-apex-rest-endpoints).
|
15
15
|
- Support for dependent picklists.
|
16
16
|
- Support for decoding [force.com Canvas](http://www.salesforce.com/us/developer/docs/platform_connectpre/canvas_framework.pdf) signed requests. (NEW!)
|
17
|
+
- Support for Chatter
|
17
18
|
|
18
19
|
## Installation
|
19
20
|
|
@@ -222,6 +223,12 @@ client.picklist_values('Automobile__c', 'Model__c', :valid_for => 'Honda')
|
|
222
223
|
# => [#<Sfdc::Mash label="Civic" value="Civic">, ... ]
|
223
224
|
```
|
224
225
|
|
226
|
+
### Chatter
|
227
|
+
|
228
|
+
```ruby
|
229
|
+
client.post_chatter('text', 'url')
|
230
|
+
```
|
231
|
+
|
225
232
|
---
|
226
233
|
|
227
234
|
### authenticate!
|
@@ -397,7 +404,7 @@ ActiveSupport::Notifications.subscribe('request.salesforce') do |*args|
|
|
397
404
|
end
|
398
405
|
```
|
399
406
|
|
400
|
-
##
|
407
|
+
## force.com Canvas
|
401
408
|
|
402
409
|
You can use Sfdc to decode signed requests from Salesforce. See [the example app](https://gist.github.com/4052312).
|
403
410
|
|
@@ -411,11 +418,6 @@ client = Sfdc.tooling(...)
|
|
411
418
|
```
|
412
419
|
|
413
420
|
---
|
414
|
-
|
415
|
-
## Contact
|
416
|
-
|
417
|
-
- Mattt Thompson <mattt@heroku.com>
|
418
|
-
|
419
421
|
## License
|
420
422
|
|
421
423
|
Sfdc is available under the MIT license. See the LICENSE file for more info.
|
data/lib/sfdc/concerns/api.rb
CHANGED
@@ -138,6 +138,11 @@ module Sfdc
|
|
138
138
|
api_get('search', :q => sosl).body
|
139
139
|
end
|
140
140
|
|
141
|
+
# get a list of recently viewed records.
|
142
|
+
def recent(num)
|
143
|
+
api_get('recent', :q => num).body
|
144
|
+
end
|
145
|
+
|
141
146
|
# Public: Insert a new record.
|
142
147
|
#
|
143
148
|
# sobject - String name of the sobject.
|
@@ -300,6 +305,14 @@ module Sfdc
|
|
300
305
|
api_get(field ? "sobjects/#{sobject}/#{field}/#{id}" : "sobjects/#{sobject}/#{id}").body
|
301
306
|
end
|
302
307
|
|
308
|
+
############### Chatter #####################
|
309
|
+
# client.post_chatter("text", "url")
|
310
|
+
def post_chatter(text, url=nil)
|
311
|
+
base_url = "chatter/feeds/news/me/feed-items?"
|
312
|
+
base_url += ((url == nil) ? "text=#{text}" : "text=#{text}&url=#{url}")
|
313
|
+
api_post(base_url)
|
314
|
+
end
|
315
|
+
|
303
316
|
private
|
304
317
|
|
305
318
|
# Internal: Returns a path to an api endpoint
|
data/lib/sfdc/config.rb
CHANGED
data/lib/sfdc/version.rb
CHANGED
data/sfdc-3.0.1.gem
ADDED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sfdc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0
|
4
|
+
version: 3.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bruce Yue
|
@@ -181,6 +181,7 @@ files:
|
|
181
181
|
- ./LICENSE
|
182
182
|
- ./Rakefile
|
183
183
|
- ./README.md
|
184
|
+
- ./sfdc-3.0.1.gem
|
184
185
|
- ./sfdc.gemspec
|
185
186
|
- spec/fixtures/auth_error_response.json
|
186
187
|
- spec/fixtures/auth_success_response.json
|