nuntium_api 0.8 → 0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/nuntium.rb +11 -0
  2. metadata +31 -12
data/lib/nuntium.rb CHANGED
@@ -108,6 +108,17 @@ class Nuntium
108
108
  self.class.post "#{@url}/#{@account}/#{@application}/send_ao.json", :basic_auth => @auth, :body => body
109
109
  end
110
110
 
111
+ # Gets the custom attributes specified for a given address. Returns a hash with the attributes
112
+ def get_custom_attributes(address)
113
+ attrs = self.class.get "#{@url}/api/custom_attributes?address=#{address}", :basic_auth => @auth
114
+ return nil unless attrs.is_a? Hash
115
+ attrs
116
+ end
117
+
118
+ def set_custom_attributes(address, attributes)
119
+ self.class.post "#{@url}/api/custom_attributes?address=#{address}", :basic_auth => @auth, :body => attributes
120
+ end
121
+
111
122
  private
112
123
 
113
124
  def write_configuration(channel)
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nuntium_api
3
3
  version: !ruby/object:Gem::Version
4
- version: "0.8"
4
+ hash: 25
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 9
9
+ version: "0.9"
5
10
  platform: ruby
6
11
  authors:
7
12
  - InsTEDD
@@ -14,24 +19,32 @@ default_executable:
14
19
  dependencies:
15
20
  - !ruby/object:Gem::Dependency
16
21
  name: httparty
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
20
25
  requirements:
21
26
  - - ">="
22
27
  - !ruby/object:Gem::Version
28
+ hash: 3
29
+ segments:
30
+ - 0
23
31
  version: "0"
24
- version:
32
+ type: :runtime
33
+ version_requirements: *id001
25
34
  - !ruby/object:Gem::Dependency
26
35
  name: json
27
- type: :runtime
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
36
+ prerelease: false
37
+ requirement: &id002 !ruby/object:Gem::Requirement
38
+ none: false
30
39
  requirements:
31
40
  - - ">="
32
41
  - !ruby/object:Gem::Version
42
+ hash: 3
43
+ segments:
44
+ - 0
33
45
  version: "0"
34
- version:
46
+ type: :runtime
47
+ version_requirements: *id002
35
48
  description: Access the Nuntium API in ruby. Nuntium is an open source and free platform -developed by InSTEDD- that allows applications to send and receive all type of messages. Examples of messages are sms, emails and twitter direct messages.
36
49
  email: aborenszweig@manas.com.ar
37
50
  executables: []
@@ -52,21 +65,27 @@ rdoc_options: []
52
65
  require_paths:
53
66
  - lib
54
67
  required_ruby_version: !ruby/object:Gem::Requirement
68
+ none: false
55
69
  requirements:
56
70
  - - ">="
57
71
  - !ruby/object:Gem::Version
72
+ hash: 3
73
+ segments:
74
+ - 0
58
75
  version: "0"
59
- version:
60
76
  required_rubygems_version: !ruby/object:Gem::Requirement
77
+ none: false
61
78
  requirements:
62
79
  - - ">="
63
80
  - !ruby/object:Gem::Version
81
+ hash: 3
82
+ segments:
83
+ - 0
64
84
  version: "0"
65
- version:
66
85
  requirements: []
67
86
 
68
87
  rubyforge_project:
69
- rubygems_version: 1.3.5
88
+ rubygems_version: 1.4.2
70
89
  signing_key:
71
90
  specification_version: 3
72
91
  summary: Access the Nuntium API in ruby