mogreet 0.0.1 → 0.0.2.pre
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.
- data/.gitignore +6 -6
- data/Gemfile +1 -2
- data/README.md +49 -28
- data/Rakefile +8 -3
- data/lib/mogreet.rb +12 -8
- data/lib/mogreet/client.rb +60 -0
- data/lib/mogreet/deprecated.rb +56 -0
- data/lib/mogreet/keyword.rb +27 -0
- data/lib/mogreet/list.rb +67 -0
- data/lib/mogreet/media.rb +19 -0
- data/lib/mogreet/request.rb +19 -0
- data/lib/mogreet/response.rb +7 -0
- data/lib/mogreet/system.rb +10 -0
- data/lib/mogreet/transaction.rb +30 -0
- data/lib/mogreet/user.rb +33 -1
- data/lib/mogreet/version.rb +2 -2
- data/mogreet.gemspec +20 -19
- data/spec/cassettes/deprecated_mms.yml +53 -0
- data/spec/cassettes/keyword_add.yml +56 -0
- data/spec/cassettes/keyword_check.yml +57 -0
- data/spec/cassettes/keyword_list.yml +121 -0
- data/spec/cassettes/keyword_remove.yml +56 -0
- data/spec/cassettes/list_append.yml +61 -0
- data/spec/cassettes/list_create.yml +57 -0
- data/spec/cassettes/list_destroy.yml +56 -0
- data/spec/cassettes/list_download.yml +59 -0
- data/spec/cassettes/list_empty.yml +56 -0
- data/spec/cassettes/list_info.yml +65 -0
- data/spec/cassettes/list_list.yml +63 -0
- data/spec/cassettes/list_prune.yml +61 -0
- data/spec/cassettes/list_send.yml +56 -0
- data/spec/cassettes/media_destroy.yml +61 -0
- data/spec/cassettes/media_list.yml +72 -0
- data/spec/cassettes/media_upload.yml +3602 -0
- data/spec/cassettes/ping_invalid.yml +51 -0
- data/spec/cassettes/ping_success.yml +147 -0
- data/spec/cassettes/transaction_lookup.yml +74 -0
- data/spec/cassettes/transaction_send.yml +101 -0
- data/spec/cassettes/user_info_success.yml +56 -0
- data/spec/cassettes/user_lookup_success.yml +104 -0
- data/spec/cassettes/user_transactions_success.yml +62 -0
- data/spec/cassettes/user_uncache_success.yml +56 -0
- data/spec/deprecated_spec.rb +37 -0
- data/spec/fixtures/api.jpg +0 -0
- data/spec/keyword_spec.rb +84 -0
- data/spec/list_spec.rb +193 -0
- data/spec/media_spec.rb +67 -0
- data/spec/ping_spec.rb +43 -0
- data/spec/spec_helper.rb +26 -7
- data/spec/transaction_spec.rb +53 -0
- data/spec/user_spec.rb +66 -0
- metadata +93 -59
- data/.rspec +0 -1
- data/LICENSE +0 -22
- data/lib/mogreet/config.rb +0 -3
- data/lib/mogreet/message.rb +0 -8
- data/lib/mogreet/mogreet.rb +0 -13
- data/lib/mogreet/response/transaction_send.rb +0 -5
- data/spec/fixtures/transaction_send.xml +0 -6
- data/spec/mogreet/config_spec.rb +0 -17
- data/spec/mogreet/message_spec.rb +0 -32
@@ -0,0 +1,57 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.mogreet.com/cm/list.create?client_id=1010101&format=json&name=test%20list&token=xyxyxyxyxyxyxyxyxyxyxyxyxyx
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ""
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- "*/*; q=0.5, application/xml"
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip, deflate
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Date:
|
22
|
+
- Wed, 20 Mar 2013 23:51:22 GMT
|
23
|
+
Server:
|
24
|
+
- Apache/2.2.21 (Unix) Phusion_Passenger/3.0.11 mod_ssl/2.2.21 OpenSSL/0.9.8q
|
25
|
+
X-Powered-By:
|
26
|
+
- Phusion Passenger (mod_rails/mod_rack) 3.0.11
|
27
|
+
X-Ua-Compatible:
|
28
|
+
- IE=Edge,chrome=1
|
29
|
+
Etag:
|
30
|
+
- "\"872820a81f2841fc9d381d42a40aa3b7\""
|
31
|
+
Cache-Control:
|
32
|
+
- max-age=0, private, must-revalidate
|
33
|
+
X-Runtime:
|
34
|
+
- "0.048843"
|
35
|
+
X-Rack-Cache:
|
36
|
+
- miss
|
37
|
+
Status:
|
38
|
+
- "200"
|
39
|
+
Content-Length:
|
40
|
+
- "115"
|
41
|
+
Content-Type:
|
42
|
+
- application/json; charset=utf-8
|
43
|
+
body:
|
44
|
+
encoding: US-ASCII
|
45
|
+
string: |
|
46
|
+
{
|
47
|
+
"response": {
|
48
|
+
"code": "1",
|
49
|
+
"status": "success",
|
50
|
+
"message": "list created",
|
51
|
+
"list_id": 17120
|
52
|
+
}
|
53
|
+
}
|
54
|
+
|
55
|
+
http_version:
|
56
|
+
recorded_at: Wed, 20 Mar 2013 23:51:22 GMT
|
57
|
+
recorded_with: VCR 2.4.0
|
@@ -0,0 +1,56 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.mogreet.com/cm/list.destroy?client_id=1010101&format=json&list_id=8228&name=test&token=xyxyxyxyxyxyxyxyxyxyxyxyxyx
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ""
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- "*/*; q=0.5, application/xml"
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip, deflate
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Date:
|
22
|
+
- Thu, 21 Mar 2013 20:26:26 GMT
|
23
|
+
Server:
|
24
|
+
- Apache/2.2.21 (Unix) Phusion_Passenger/3.0.11 mod_ssl/2.2.21 OpenSSL/0.9.8q
|
25
|
+
X-Powered-By:
|
26
|
+
- Phusion Passenger (mod_rails/mod_rack) 3.0.11
|
27
|
+
X-Ua-Compatible:
|
28
|
+
- IE=Edge,chrome=1
|
29
|
+
Etag:
|
30
|
+
- "\"1d56b5fd15a78f92318b7365dcf9e8ee\""
|
31
|
+
Cache-Control:
|
32
|
+
- max-age=0, private, must-revalidate
|
33
|
+
X-Runtime:
|
34
|
+
- "0.064466"
|
35
|
+
X-Rack-Cache:
|
36
|
+
- miss
|
37
|
+
Status:
|
38
|
+
- "200"
|
39
|
+
Content-Length:
|
40
|
+
- "97"
|
41
|
+
Content-Type:
|
42
|
+
- application/json; charset=utf-8
|
43
|
+
body:
|
44
|
+
encoding: US-ASCII
|
45
|
+
string: |
|
46
|
+
{
|
47
|
+
"response": {
|
48
|
+
"code": "1",
|
49
|
+
"status": "success",
|
50
|
+
"message": "list destroyed"
|
51
|
+
}
|
52
|
+
}
|
53
|
+
|
54
|
+
http_version:
|
55
|
+
recorded_at: Thu, 21 Mar 2013 20:26:26 GMT
|
56
|
+
recorded_with: VCR 2.4.0
|
@@ -0,0 +1,59 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.mogreet.com/cm/list.download?client_id=1010101&format=json&list_id=8228&token=xyxyxyxyxyxyxyxyxyxyxyxyxyx
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ""
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- "*/*; q=0.5, application/xml"
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip, deflate
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Date:
|
22
|
+
- Thu, 21 Mar 2013 20:21:00 GMT
|
23
|
+
Server:
|
24
|
+
- Apache/2.2.21 (Unix) Phusion_Passenger/3.0.11 mod_ssl/2.2.21 OpenSSL/0.9.8q
|
25
|
+
X-Powered-By:
|
26
|
+
- Phusion Passenger (mod_rails/mod_rack) 3.0.11
|
27
|
+
X-Ua-Compatible:
|
28
|
+
- IE=Edge,chrome=1
|
29
|
+
Etag:
|
30
|
+
- "\"f71cd38deab766a964ca78a733501572\""
|
31
|
+
Cache-Control:
|
32
|
+
- max-age=0, private, must-revalidate
|
33
|
+
X-Runtime:
|
34
|
+
- "0.050488"
|
35
|
+
X-Rack-Cache:
|
36
|
+
- miss
|
37
|
+
Status:
|
38
|
+
- "200"
|
39
|
+
Content-Length:
|
40
|
+
- "121"
|
41
|
+
Content-Type:
|
42
|
+
- application/json; charset=utf-8
|
43
|
+
body:
|
44
|
+
encoding: US-ASCII
|
45
|
+
string: |
|
46
|
+
{
|
47
|
+
"response": {
|
48
|
+
"code": "1",
|
49
|
+
"status": "success",
|
50
|
+
"message": "data exported",
|
51
|
+
"recipients": [
|
52
|
+
|
53
|
+
]
|
54
|
+
}
|
55
|
+
}
|
56
|
+
|
57
|
+
http_version:
|
58
|
+
recorded_at: Thu, 21 Mar 2013 20:21:01 GMT
|
59
|
+
recorded_with: VCR 2.4.0
|
@@ -0,0 +1,56 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.mogreet.com/cm/list.empty?client_id=1010101&format=json&list_id=8228&name=test&token=xyxyxyxyxyxyxyxyxyxyxyxyxyx
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ""
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- "*/*; q=0.5, application/xml"
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip, deflate
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Date:
|
22
|
+
- Thu, 21 Mar 2013 20:25:00 GMT
|
23
|
+
Server:
|
24
|
+
- Apache/2.2.21 (Unix) Phusion_Passenger/3.0.11 mod_ssl/2.2.21 OpenSSL/0.9.8q
|
25
|
+
X-Powered-By:
|
26
|
+
- Phusion Passenger (mod_rails/mod_rack) 3.0.11
|
27
|
+
X-Ua-Compatible:
|
28
|
+
- IE=Edge,chrome=1
|
29
|
+
Etag:
|
30
|
+
- "\"a1138acda506b9568169d9771010101837ea\""
|
31
|
+
Cache-Control:
|
32
|
+
- max-age=0, private, must-revalidate
|
33
|
+
X-Runtime:
|
34
|
+
- "0.042186"
|
35
|
+
X-Rack-Cache:
|
36
|
+
- miss
|
37
|
+
Status:
|
38
|
+
- "200"
|
39
|
+
Content-Length:
|
40
|
+
- "93"
|
41
|
+
Content-Type:
|
42
|
+
- application/json; charset=utf-8
|
43
|
+
body:
|
44
|
+
encoding: US-ASCII
|
45
|
+
string: |
|
46
|
+
{
|
47
|
+
"response": {
|
48
|
+
"code": "1",
|
49
|
+
"status": "success",
|
50
|
+
"message": "list reset"
|
51
|
+
}
|
52
|
+
}
|
53
|
+
|
54
|
+
http_version:
|
55
|
+
recorded_at: Thu, 21 Mar 2013 20:25:00 GMT
|
56
|
+
recorded_with: VCR 2.4.0
|
@@ -0,0 +1,65 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.mogreet.com/cm/list.info?client_id=1010101&format=json&list_id=8228&token=xyxyxyxyxyxyxyxyxyxyxyxyxyx
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ""
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- "*/*; q=0.5, application/xml"
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip, deflate
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Date:
|
22
|
+
- Wed, 20 Mar 2013 23:46:22 GMT
|
23
|
+
Server:
|
24
|
+
- Apache/2.2.21 (Unix) Phusion_Passenger/3.0.11 mod_ssl/2.2.21 OpenSSL/0.9.8q
|
25
|
+
X-Powered-By:
|
26
|
+
- Phusion Passenger (mod_rails/mod_rack) 3.0.11
|
27
|
+
X-Ua-Compatible:
|
28
|
+
- IE=Edge,chrome=1
|
29
|
+
Etag:
|
30
|
+
- "\"a63725212a57c3dbd1cd1d49e35bc19f\""
|
31
|
+
Cache-Control:
|
32
|
+
- max-age=0, private, must-revalidate
|
33
|
+
X-Runtime:
|
34
|
+
- "0.051560"
|
35
|
+
X-Rack-Cache:
|
36
|
+
- miss
|
37
|
+
Status:
|
38
|
+
- "200"
|
39
|
+
Content-Length:
|
40
|
+
- "285"
|
41
|
+
Content-Type:
|
42
|
+
- application/json; charset=utf-8
|
43
|
+
body:
|
44
|
+
encoding: US-ASCII
|
45
|
+
string: |
|
46
|
+
{
|
47
|
+
"response": {
|
48
|
+
"code": "1",
|
49
|
+
"status": "success",
|
50
|
+
"message": "list retrieved",
|
51
|
+
"list": {
|
52
|
+
"id": "8228",
|
53
|
+
"name": "test",
|
54
|
+
"type": "uploaded",
|
55
|
+
"total": "0",
|
56
|
+
"created": "2012-02-27T05:21:50Z",
|
57
|
+
"updated": "2012-02-27T05:21:50Z",
|
58
|
+
"last_used": ""
|
59
|
+
}
|
60
|
+
}
|
61
|
+
}
|
62
|
+
|
63
|
+
http_version:
|
64
|
+
recorded_at: Wed, 20 Mar 2013 23:46:10 GMT
|
65
|
+
recorded_with: VCR 2.4.0
|
@@ -0,0 +1,63 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.mogreet.com/cm/list.list?client_id=1010101&format=json&token=xyxyxyxyxyxyxyxyxyxyxyxyxyx
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ""
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- "*/*; q=0.5, application/xml"
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip, deflate
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Date:
|
22
|
+
- Wed, 20 Mar 2013 23:31:45 GMT
|
23
|
+
Server:
|
24
|
+
- Apache/2.2.21 (Unix) Phusion_Passenger/3.0.11 mod_ssl/2.2.21 OpenSSL/0.9.8q
|
25
|
+
X-Powered-By:
|
26
|
+
- Phusion Passenger (mod_rails/mod_rack) 3.0.11
|
27
|
+
X-Ua-Compatible:
|
28
|
+
- IE=Edge,chrome=1
|
29
|
+
Etag:
|
30
|
+
- "\"f1ebaf3217f9a8ccf3c87f776fe55d9f\""
|
31
|
+
Cache-Control:
|
32
|
+
- max-age=0, private, must-revalidate
|
33
|
+
X-Runtime:
|
34
|
+
- "0.115049"
|
35
|
+
X-Rack-Cache:
|
36
|
+
- miss
|
37
|
+
Status:
|
38
|
+
- "200"
|
39
|
+
Content-Length:
|
40
|
+
- "7529"
|
41
|
+
Content-Type:
|
42
|
+
- application/json; charset=utf-8
|
43
|
+
body:
|
44
|
+
encoding: US-ASCII
|
45
|
+
string: |
|
46
|
+
{
|
47
|
+
"response": {
|
48
|
+
"code": "1",
|
49
|
+
"status": "success",
|
50
|
+
"message": "lists retrieved",
|
51
|
+
"lists": [
|
52
|
+
{
|
53
|
+
"id": "8228",
|
54
|
+
"name": "test",
|
55
|
+
"type": "uploaded"
|
56
|
+
}
|
57
|
+
]
|
58
|
+
}
|
59
|
+
}
|
60
|
+
|
61
|
+
http_version:
|
62
|
+
recorded_at: Wed, 20 Mar 2013 23:31:32 GMT
|
63
|
+
recorded_with: VCR 2.4.0
|
@@ -0,0 +1,61 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.mogreet.com/cm/list.prune?client_id=1010101&format=json&list_id=8228&numbers=3108675309&token=xyxyxyxyxyxyxyxyxyxyxyxyxyx
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ""
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- "*/*; q=0.5, application/xml"
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip, deflate
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Date:
|
22
|
+
- Thu, 21 Mar 2013 20:14:20 GMT
|
23
|
+
Server:
|
24
|
+
- Apache/2.2.21 (Unix) Phusion_Passenger/3.0.11 mod_ssl/2.2.21 OpenSSL/0.9.8q
|
25
|
+
X-Powered-By:
|
26
|
+
- Phusion Passenger (mod_rails/mod_rack) 3.0.11
|
27
|
+
X-Ua-Compatible:
|
28
|
+
- IE=Edge,chrome=1
|
29
|
+
Etag:
|
30
|
+
- "\"978f3ae83a2b7e8b50d16e48c26ab01c\""
|
31
|
+
Cache-Control:
|
32
|
+
- max-age=0, private, must-revalidate
|
33
|
+
X-Runtime:
|
34
|
+
- "0.149810"
|
35
|
+
X-Rack-Cache:
|
36
|
+
- miss
|
37
|
+
Status:
|
38
|
+
- "200"
|
39
|
+
Content-Length:
|
40
|
+
- "182"
|
41
|
+
Content-Type:
|
42
|
+
- application/json; charset=utf-8
|
43
|
+
body:
|
44
|
+
encoding: US-ASCII
|
45
|
+
string: |
|
46
|
+
{
|
47
|
+
"response": {
|
48
|
+
"code": "1",
|
49
|
+
"status": "success",
|
50
|
+
"message": "request processed",
|
51
|
+
"statistics": {
|
52
|
+
"deleted": "1",
|
53
|
+
"not_found": "0",
|
54
|
+
"rejected": "0"
|
55
|
+
}
|
56
|
+
}
|
57
|
+
}
|
58
|
+
|
59
|
+
http_version:
|
60
|
+
recorded_at: Thu, 21 Mar 2013 20:14:08 GMT
|
61
|
+
recorded_with: VCR 2.4.0
|
@@ -0,0 +1,56 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.mogreet.com/cm/list.send?campaign_id=20948&client_id=1010101&format=json&list_id=8228&message=hello%20world&token=xyxyxyxyxyxyxyxyxyxyxyxyxyx
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ""
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- "*/*; q=0.5, application/xml"
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip, deflate
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Date:
|
22
|
+
- Thu, 21 Mar 2013 20:18:39 GMT
|
23
|
+
Server:
|
24
|
+
- Apache/2.2.21 (Unix) Phusion_Passenger/3.0.11 mod_ssl/2.2.21 OpenSSL/0.9.8q
|
25
|
+
X-Powered-By:
|
26
|
+
- Phusion Passenger (mod_rails/mod_rack) 3.0.11
|
27
|
+
X-Ua-Compatible:
|
28
|
+
- IE=Edge,chrome=1
|
29
|
+
Etag:
|
30
|
+
- "\"6f85d07cd56d8f1eba15b13c142af4dc\""
|
31
|
+
Cache-Control:
|
32
|
+
- max-age=0, private, must-revalidate
|
33
|
+
X-Runtime:
|
34
|
+
- "0.469107"
|
35
|
+
X-Rack-Cache:
|
36
|
+
- miss
|
37
|
+
Status:
|
38
|
+
- "200"
|
39
|
+
Content-Length:
|
40
|
+
- "89"
|
41
|
+
Content-Type:
|
42
|
+
- application/json; charset=utf-8
|
43
|
+
body:
|
44
|
+
encoding: US-ASCII
|
45
|
+
string: |
|
46
|
+
{
|
47
|
+
"response": {
|
48
|
+
"code": "1",
|
49
|
+
"status": "success",
|
50
|
+
"message": "queued"
|
51
|
+
}
|
52
|
+
}
|
53
|
+
|
54
|
+
http_version:
|
55
|
+
recorded_at: Thu, 21 Mar 2013 20:18:27 GMT
|
56
|
+
recorded_with: VCR 2.4.0
|