washbullet 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -0
- data/.rspec +1 -1
- data/.travis.yml +3 -0
- data/README.md +61 -24
- data/Rakefile +6 -1
- data/lib/washbullet.rb +5 -0
- data/lib/washbullet/api.rb +3 -1
- data/lib/washbullet/api/contacts.rb +13 -3
- data/lib/washbullet/api/devices.rb +9 -3
- data/lib/washbullet/api/me.rb +1 -1
- data/lib/washbullet/api/pushes.rb +14 -55
- data/lib/washbullet/api/subscriptions.rb +17 -0
- data/lib/washbullet/{basic_authentication.rb → authorization.rb} +1 -1
- data/lib/washbullet/channel.rb +29 -0
- data/lib/washbullet/client.rb +18 -18
- data/lib/washbullet/contact.rb +35 -0
- data/lib/washbullet/device.rb +27 -0
- data/lib/washbullet/entity.rb +27 -0
- data/lib/washbullet/http_exception.rb +19 -14
- data/lib/washbullet/push.rb +27 -0
- data/lib/washbullet/pushable.rb +59 -0
- data/lib/washbullet/pushable/file.rb +55 -0
- data/lib/washbullet/pushable/link.rb +13 -0
- data/lib/washbullet/pushable/note.rb +13 -0
- data/lib/washbullet/request.rb +1 -1
- data/lib/washbullet/user.rb +9 -0
- data/lib/washbullet/version.rb +1 -1
- data/spec/fixtures/green.png +0 -0
- data/spec/spec_helper.rb +48 -68
- data/spec/vcr/Washbullet_API_Contacts/_contacts/Get_own_active_contacts.yml +48 -0
- data/spec/vcr/Washbullet_API_Devices/_devices/Get_own_active_devices.yml +50 -0
- data/spec/vcr/Washbullet_API_Me/_me/Get_the_self_information.yml +50 -0
- data/spec/vcr/Washbullet_API_Subscriptions/_channel_info/when_channel_is_existing/Get_information_about_a_channel.yml +49 -0
- data/spec/vcr/Washbullet_API_Subscriptions/_channel_info/when_channel_is_not_existing/raise_error.yml +49 -0
- data/spec/vcr/Washbullet_API_Subscriptions/_subscriptions/Get_list_subscriptions.yml +50 -0
- data/spec/vcr/Washbullet_Pushable_File/_push/.yml +170 -0
- data/spec/vcr/Washbullet_Pushable_Link/_push/.yml +52 -0
- data/spec/vcr/Washbullet_Pushable_Note/_push/.yml +51 -0
- data/spec/washbullet/api/contacts_spec.rb +15 -0
- data/spec/washbullet/api/devices_spec.rb +14 -0
- data/spec/washbullet/api/me_spec.rb +11 -0
- data/spec/washbullet/api/subscriptions_spec.rb +31 -0
- data/spec/washbullet/pushable/file_spec.rb +23 -0
- data/spec/washbullet/pushable/link_spec.rb +24 -0
- data/spec/washbullet/pushable/note_spec.rb +20 -0
- data/washbullet.gemspec +5 -1
- metadata +107 -29
- data/spec/fixtures/contacts.json +0 -16
- data/spec/fixtures/devices.json +0 -19
- data/spec/fixtures/push.json +0 -18
- data/spec/fixtures/pushes.json +0 -24
- data/spec/fixtures/upload_request.json +0 -14
- data/spec/fixtures/users.json +0 -31
- data/spec/washbullet/client_spec.rb +0 -9
data/spec/fixtures/contacts.json
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"contacts":[
|
3
|
-
{
|
4
|
-
"iden": "ubdcjAfszs0Smi",
|
5
|
-
"status": "user",
|
6
|
-
"name": "Ryan Oldenburg",
|
7
|
-
"created": 1399011660.4298899,
|
8
|
-
"modified": 1399011660.42976,
|
9
|
-
"id": 5695496404336640,
|
10
|
-
"source": "user",
|
11
|
-
"email": "ryanjoldenburg@gmail.com"
|
12
|
-
"email_normalized": "ryanjoldenburg@gmail.com",
|
13
|
-
"active": true
|
14
|
-
}
|
15
|
-
]
|
16
|
-
}
|
data/spec/fixtures/devices.json
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"devices":[
|
3
|
-
{
|
4
|
-
"iden":"u1qSJddxeKwOGuGW",
|
5
|
-
"push_token":"u1qSJddxeKwOGuGWu1qSJddxeKwOGuGWu1qSJddxeKwOGuGWu1qSJddxeK",
|
6
|
-
"app_version":74,
|
7
|
-
"android_sdk_version":"19",
|
8
|
-
"fingerprint":"",
|
9
|
-
"active":true,
|
10
|
-
"nickname":"Galaxy S4",
|
11
|
-
"manufacturer":"samsung",
|
12
|
-
"kind":"android",
|
13
|
-
"created":1394748080.0139201,
|
14
|
-
"modified":1399008037.8487799,
|
15
|
-
"android_version":"4.4.2",
|
16
|
-
"model":"SCH-I545"
|
17
|
-
}
|
18
|
-
]
|
19
|
-
}
|
data/spec/fixtures/push.json
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"iden":"ubdpjxxxOK0sKG",
|
3
|
-
"type":"note",
|
4
|
-
"title":"Note title",
|
5
|
-
"body":"Note body",
|
6
|
-
"created":1399253701.9746201,
|
7
|
-
"modified":1399253701.9744401,
|
8
|
-
"active":true,
|
9
|
-
"dismissed":false,
|
10
|
-
"owner_iden":"ubd",
|
11
|
-
"target_device_iden":"ubddjAy95rgBxc",
|
12
|
-
"sender_iden":"ubd",
|
13
|
-
"sender_email":"ryan@pushbullet.com"
|
14
|
-
"sender_email_normalized":"ryan@pushbullet.com",
|
15
|
-
"receiver_iden":"ubd",
|
16
|
-
"receiver_email":"ryan@pushbullet.com",
|
17
|
-
"receiver_email_normalized":"ryan@pushbullet.com"
|
18
|
-
}
|
data/spec/fixtures/pushes.json
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"pushes": [
|
3
|
-
{
|
4
|
-
"iden": "ubdpjAkaGXvUl2",
|
5
|
-
"type": "link",
|
6
|
-
"active": true,
|
7
|
-
"dismissed": false,
|
8
|
-
"created": 1.39934925E9,
|
9
|
-
"modified": 1.39934925E9,
|
10
|
-
"title": "Pushbullet",
|
11
|
-
"body": "Documenting our API",
|
12
|
-
"url": "http://docs.pushbullet.com",
|
13
|
-
"owner_iden": "ubd",
|
14
|
-
"target_device_iden": "ubddjAy95rgBxc",
|
15
|
-
"sender_iden": "ubd",
|
16
|
-
"sender_email": "ryan@pushbullet.com"
|
17
|
-
"sender_email_normalized": "ryan@pushbullet.com",
|
18
|
-
"receiver_iden": "ubd",
|
19
|
-
"receiver_email": "ryan@pushbullet.com",
|
20
|
-
"receiver_email_normalized": "ryan@pushbullet.com",
|
21
|
-
}
|
22
|
-
],
|
23
|
-
"cursor": null
|
24
|
-
}
|
@@ -1,14 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"file_type":"image/png",
|
3
|
-
"file_name":"image.png",
|
4
|
-
"file_url":"https://s3.amazonaws.com/pushbullet-uploads/ubd-VWb1dP5XrZzvHReWHCycIwPyuAMp2R9I/image.png",
|
5
|
-
"upload_url":"https://s3.amazonaws.com/pushbullet-uploads",
|
6
|
-
"data":{
|
7
|
-
"awsaccesskeyid":"AKIAJJIUQPUDGPM4GD3W",
|
8
|
-
"acl":"public-read",
|
9
|
-
"key":"ubd-CWb1dP5XrZzvHReWHCycIwPyuAMp2R9I/image.png",
|
10
|
-
"signature":"UX5s1uIy1ov6+xlj58JY7rGFKcs=",
|
11
|
-
"policy":"eyKjb25kaXRpb25zIjogW3siYnVja2V0IjogInB1c2hidWxsZXQtdXBsb2FkcyJ9LCB7ImtleSI6ICJ1YmQtVldiMWRQNVhyWnp2SFJlV0hDeWNJd1B5dUFNcDJSOUkvaW1hZ2UucG5nIn0sIHsiYWNsIjogInB1YmxpYy1yZWFkIn0sIFsiY29udGVudC1sZW5ndGgtcmFuZ2UiLCAxLCAyNjIxNDQwMF0sIFsiZXEiLCAiJENvbnRlbnQtVHlwZSIsICJpbWFnZS9wbmciXV0sICJleHBpcmF0aW9uIjogIjIwMTQtMDUtMDVUMjI6NTE6MzcuMjM0MTMwWiJ9",
|
12
|
-
"content-type":"image/png"
|
13
|
-
}
|
14
|
-
}
|
data/spec/fixtures/users.json
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"iden": "ubd",
|
3
|
-
"api_key": "",
|
4
|
-
"email": "",
|
5
|
-
"email_normalized": "",
|
6
|
-
"admin": true,
|
7
|
-
"created": 1357941753.8287899,
|
8
|
-
"modified": 1399325992.1842301,
|
9
|
-
"google_id": "110038027176632715601",
|
10
|
-
"google_userinfo": {
|
11
|
-
"family_name": "Oldenburg",
|
12
|
-
"name": "Ryan Oldenburg",
|
13
|
-
"picture": "",
|
14
|
-
"locale": "en",
|
15
|
-
"gender": "male",
|
16
|
-
"email": "",
|
17
|
-
"link": "",
|
18
|
-
"given_name": "Ryan",
|
19
|
-
"id": "110038027176632715601",
|
20
|
-
"hd": "",
|
21
|
-
"verified_email": true
|
22
|
-
},
|
23
|
-
"preferences": {
|
24
|
-
"onboarding": {
|
25
|
-
"app": false,
|
26
|
-
"friends": false,
|
27
|
-
"extension": false
|
28
|
-
},
|
29
|
-
"social": false
|
30
|
-
}
|
31
|
-
}
|