Skip to content

Commit

Permalink
Merge pull request #4 from ChrisYammine/v1.0.1
Browse files Browse the repository at this point in the history
V1.0.1
  • Loading branch information
Christopher Yammine authored Jan 22, 2017
2 parents 3eec6c3 + c20fc72 commit 8fcbd97
Show file tree
Hide file tree
Showing 19 changed files with 597 additions and 22 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ end
def deps do
[
...,
{:ex_trello, "~> 1.0.0"}
{:ex_trello, "~> 1.0.1"}
]
end
```
Expand Down
40 changes: 40 additions & 0 deletions fixtures/vcr_cassettes/get_member_with_notifications.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[
{
"request": {
"body": "",
"headers": {
"Authorization": "***"
},
"method": "get",
"options": [],
"request_body": "",
"url": "https://api.trello.com/1/members/me?notifications=all"
},
"response": {
"body": "{\"id\":\"560ee9cc994c6f0f35fd6259\",\"avatarHash\":null,\"bio\":\"\",\"bioData\":{\"emoji\":{}},\"confirmed\":true,\"fullName\":\"Chris Yammine\",\"idPremOrgsAdmin\":[],\"initials\":\"CY\",\"memberType\":\"normal\",\"products\":[],\"status\":\"disconnected\",\"url\":\"https://trello.com/cyammine\",\"username\":\"cyammine\",\"avatarSource\":null,\"email\":\"[email protected]\",\"gravatarHash\":\"88f7fe1be53f40ff9233c12cf7c4ac34\",\"idBoards\":[\"560ee9cc994c6f0f35fd625a\",\"560ee950cf3e5f0adbe569f1\",\"56e8e29ad0ea27cec06d7d8a\",\"57663306e4b15193fcc97483\",\"576ee4d1724f111c75256509\",\"576ef188653694f9739322dd\",\"57a11ec4985cc68f7fbfd574\",\"57a11f22bbd6eda0190beeca\",\"57a1228c2faa01332768dffa\",\"57a12ae52c4ed69442b1db67\",\"57b0a4f66d8393328375bc83\",\"57b0a6f68d499705e743f3dc\",\"57b0a9692bd632657caf3859\",\"57b0aaa4b41118f8dd3c47e3\",\"57b206db74fa3ebbffb608d7\",\"57b206dc864eadbd9c1b69c6\",\"57e4ac69e1727bee7aea0766\",\"581123b17cf99a01294434a9\",\"5811912702c6558fbd0dcf39\",\"5827c37ffe5283fd2c0c61e0\",\"5819f3dc02fef7104f6ab537\"],\"idEnterprise\":null,\"idOrganizations\":[\"56e8e25c6615e469f60938a8\"],\"idEnterprisesAdmin\":[],\"loginTypes\":[\"google\",\"android\",\"password\"],\"oneTimeMessagesDismissed\":[\"PowerUpsPaneExplainer\",\"GoldIntro\",\"PowerUpsLimitFullAd\"],\"prefs\":{\"sendSummaries\":true,\"minutesBetweenSummaries\":1,\"minutesBeforeDeadlineToNotify\":1440,\"colorBlind\":false,\"locale\":\"\"},\"trophies\":[],\"uploadedAvatarHash\":null,\"premiumFeatures\":[],\"idBoardsPinned\":null,\"notifications\":[{\"id\":\"587862d917c90d4e25e443d5\",\"unread\":false,\"type\":\"mentionedOnCard\",\"date\":\"2017-01-13T05:17:13.213Z\",\"data\":{\"text\":\"@cyammine I wonder what would show up here: 🚝🚆🚉 猜猜看呗\",\"card\":{\"shortLink\":\"1v9vVEkG\",\"idShort\":40,\"name\":\"Coursera: Machine Learning Specialization\",\"id\":\"5852fd3d1179f8f450bccfff\"},\"board\":{\"shortLink\":\"Dj4qhV6Y\",\"name\":\"10K Hrs Practice\",\"id\":\"581123b17cf99a01294434a9\"}},\"idMemberCreator\":\"56e87b654e27da2d988898a0\",\"memberCreator\":{\"id\":\"56e87b654e27da2d988898a0\",\"avatarHash\":null,\"fullName\":\"Meichen Zhou\",\"initials\":\"MZ\",\"username\":\"meichenzhou\"}},{\"id\":\"5878621befbfe75e253fd5f6\",\"unread\":false,\"type\":\"mentionedOnCard\",\"date\":\"2017-01-13T05:14:03.703Z\",\"data\":{\"text\":\"@cyammine Don't forget this ^\",\"card\":{\"shortLink\":\"1v9vVEkG\",\"idShort\":40,\"name\":\"Coursera: Machine Learning Specialization\",\"id\":\"5852fd3d1179f8f450bccfff\"},\"board\":{\"shortLink\":\"Dj4qhV6Y\",\"name\":\"10K Hrs Practice\",\"id\":\"581123b17cf99a01294434a9\"}},\"idMemberCreator\":\"56e87b654e27da2d988898a0\",\"memberCreator\":{\"id\":\"56e87b654e27da2d988898a0\",\"avatarHash\":null,\"fullName\":\"Meichen Zhou\",\"initials\":\"MZ\",\"username\":\"meichenzhou\"}}]}",
"headers": {
"Cache-Control": "max-age=0, must-revalidate, no-cache, no-store",
"X-Content-Type-Options": "nosniff",
"Strict-Transport-Security": "max-age=15768000",
"X-XSS-Protection": "1; mode=block",
"X-FRAME-OPTIONS": "DENY",
"X-Trello-Version": "1.871.0",
"X-Trello-Environment": "Production",
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "GET, PUT, POST, DELETE",
"Access-Control-Allow-Headers": "Authorization, Accept, Content-Type",
"X-Server-Time": "1485022935553",
"Expires": "Thu, 01 Jan 1970 00:00:00",
"X-Trello-Index-Last-Update": "14",
"Content-Type": "application/json; charset=utf-8",
"ETag": "W/\"HdOKYNoYgA/OLKZbasfxvA==\"",
"Date": "Sat, 21 Jan 2017 18:22:15 GMT",
"Content-Length": "2564",
"Connection": "keep-alive",
"Set-Cookie": "<REMOVED> Secure"
},
"status_code": 200,
"type": "ok"
}
}
]
40 changes: 40 additions & 0 deletions fixtures/vcr_cassettes/get_notification.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[
{
"request": {
"body": "",
"headers": {
"Authorization": "***"
},
"method": "get",
"options": [],
"request_body": "",
"url": "https://api.trello.com/1/notifications/5878621befbfe75e253fd5f6?"
},
"response": {
"body": "{\"id\":\"5878621befbfe75e253fd5f6\",\"unread\":false,\"type\":\"mentionedOnCard\",\"date\":\"2017-01-13T05:14:03.703Z\",\"data\":{\"text\":\"@cyammine Don't forget this ^\",\"card\":{\"shortLink\":\"1v9vVEkG\",\"idShort\":40,\"name\":\"Coursera: Machine Learning Specialization\",\"id\":\"5852fd3d1179f8f450bccfff\"},\"board\":{\"shortLink\":\"Dj4qhV6Y\",\"name\":\"10K Hrs Practice\",\"id\":\"581123b17cf99a01294434a9\"}},\"idMemberCreator\":\"56e87b654e27da2d988898a0\",\"memberCreator\":{\"id\":\"56e87b654e27da2d988898a0\",\"avatarHash\":null,\"fullName\":\"Meichen Zhou\",\"initials\":\"MZ\",\"username\":\"meichenzhou\"}}",
"headers": {
"Cache-Control": "max-age=0, must-revalidate, no-cache, no-store",
"X-Content-Type-Options": "nosniff",
"Strict-Transport-Security": "max-age=15768000",
"X-XSS-Protection": "1; mode=block",
"X-FRAME-OPTIONS": "DENY",
"X-Trello-Version": "1.861.0",
"X-Trello-Environment": "Production",
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "GET, PUT, POST, DELETE",
"Access-Control-Allow-Headers": "Authorization, Accept, Content-Type",
"X-Server-Time": "1484288129740",
"Expires": "Thu, 01 Jan 1970 00:00:00",
"Content-Type": "application/json; charset=utf-8",
"Content-Length": "554",
"ETag": "W/\"22a-d25bebbd\"",
"Vary": "Accept-Encoding",
"Date": "Fri, 13 Jan 2017 06:15:29 GMT",
"Connection": "keep-alive",
"Set-Cookie": "<REMOVED> Secure"
},
"status_code": 200,
"type": "ok"
}
}
]
40 changes: 40 additions & 0 deletions fixtures/vcr_cassettes/get_notification_with_options.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[
{
"request": {
"body": "",
"headers": {
"Authorization": "***"
},
"method": "get",
"options": [],
"request_body": "",
"url": "https://api.trello.com/1/notifications/5878621befbfe75e253fd5f6?card=true&card_fields=idChecklists"
},
"response": {
"body": "{\"id\":\"5878621befbfe75e253fd5f6\",\"unread\":false,\"type\":\"mentionedOnCard\",\"date\":\"2017-01-13T05:14:03.703Z\",\"data\":{\"text\":\"@cyammine Don't forget this ^\",\"card\":{\"shortLink\":\"1v9vVEkG\",\"idShort\":40,\"name\":\"Coursera: Machine Learning Specialization\",\"id\":\"5852fd3d1179f8f450bccfff\"},\"board\":{\"shortLink\":\"Dj4qhV6Y\",\"name\":\"10K Hrs Practice\",\"id\":\"581123b17cf99a01294434a9\"}},\"idMemberCreator\":\"56e87b654e27da2d988898a0\",\"memberCreator\":{\"id\":\"56e87b654e27da2d988898a0\",\"avatarHash\":null,\"fullName\":\"Meichen Zhou\",\"initials\":\"MZ\",\"username\":\"meichenzhou\"},\"card\":{\"id\":\"5852fd3d1179f8f450bccfff\",\"idChecklists\":[\"585308c4faaf262f51cc5885\"]}}",
"headers": {
"Cache-Control": "max-age=0, must-revalidate, no-cache, no-store",
"X-Content-Type-Options": "nosniff",
"Strict-Transport-Security": "max-age=15768000",
"X-XSS-Protection": "1; mode=block",
"X-FRAME-OPTIONS": "DENY",
"X-Trello-Version": "1.861.0",
"X-Trello-Environment": "Production",
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "GET, PUT, POST, DELETE",
"Access-Control-Allow-Headers": "Authorization, Accept, Content-Type",
"X-Server-Time": "1484288128318",
"Expires": "Thu, 01 Jan 1970 00:00:00",
"Content-Type": "application/json; charset=utf-8",
"Content-Length": "639",
"ETag": "W/\"27f-fab46925\"",
"Vary": "Accept-Encoding",
"Date": "Fri, 13 Jan 2017 06:15:28 GMT",
"Connection": "keep-alive",
"Set-Cookie": "<REMOVED> Secure"
},
"status_code": 200,
"type": "ok"
}
}
]
39 changes: 39 additions & 0 deletions fixtures/vcr_cassettes/get_notifications.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
[
{
"request": {
"body": "",
"headers": {
"Authorization": "***"
},
"method": "get",
"options": [],
"request_body": "",
"url": "https://api.trello.com/1/members/me/notifications?"
},
"response": {
"body": "[{\"id\":\"587862d917c90d4e25e443d5\",\"unread\":false,\"type\":\"mentionedOnCard\",\"date\":\"2017-01-13T05:17:13.213Z\",\"data\":{\"text\":\"@cyammine I wonder what would show up here: 🚝🚆🚉 猜猜看呗\",\"card\":{\"shortLink\":\"1v9vVEkG\",\"idShort\":40,\"name\":\"Coursera: Machine Learning Specialization\",\"id\":\"5852fd3d1179f8f450bccfff\"},\"board\":{\"shortLink\":\"Dj4qhV6Y\",\"name\":\"10K Hrs Practice\",\"id\":\"581123b17cf99a01294434a9\"}},\"idMemberCreator\":\"56e87b654e27da2d988898a0\",\"memberCreator\":{\"id\":\"56e87b654e27da2d988898a0\",\"avatarHash\":null,\"fullName\":\"Meichen Zhou\",\"initials\":\"MZ\",\"username\":\"meichenzhou\"}},{\"id\":\"5878621befbfe75e253fd5f6\",\"unread\":false,\"type\":\"mentionedOnCard\",\"date\":\"2017-01-13T05:14:03.703Z\",\"data\":{\"text\":\"@cyammine Don't forget this ^\",\"card\":{\"shortLink\":\"1v9vVEkG\",\"idShort\":40,\"name\":\"Coursera: Machine Learning Specialization\",\"id\":\"5852fd3d1179f8f450bccfff\"},\"board\":{\"shortLink\":\"Dj4qhV6Y\",\"name\":\"10K Hrs Practice\",\"id\":\"581123b17cf99a01294434a9\"}},\"idMemberCreator\":\"56e87b654e27da2d988898a0\",\"memberCreator\":{\"id\":\"56e87b654e27da2d988898a0\",\"avatarHash\":null,\"fullName\":\"Meichen Zhou\",\"initials\":\"MZ\",\"username\":\"meichenzhou\"}}]",
"headers": {
"Cache-Control": "max-age=0, must-revalidate, no-cache, no-store",
"X-Content-Type-Options": "nosniff",
"Strict-Transport-Security": "max-age=15768000",
"X-XSS-Protection": "1; mode=block",
"X-FRAME-OPTIONS": "DENY",
"X-Trello-Version": "1.861.0",
"X-Trello-Environment": "Production",
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "GET, PUT, POST, DELETE",
"Access-Control-Allow-Headers": "Authorization, Accept, Content-Type",
"X-Server-Time": "1484288400788",
"Expires": "Thu, 01 Jan 1970 00:00:00",
"Content-Type": "application/json; charset=utf-8",
"ETag": "W/\"Gv9NFKi5YIgisjETEiMwMQ==\"",
"Date": "Fri, 13 Jan 2017 06:20:00 GMT",
"Content-Length": "1151",
"Connection": "keep-alive",
"Set-Cookie": "<REMOVED> Secure"
},
"status_code": 200,
"type": "ok"
}
}
]
40 changes: 40 additions & 0 deletions fixtures/vcr_cassettes/get_notifications_with_options.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[
{
"request": {
"body": "",
"headers": {
"Authorization": "***"
},
"method": "get",
"options": [],
"request_body": "",
"url": "https://api.trello.com/1/members/me/notifications?limit=1"
},
"response": {
"body": "[{\"id\":\"587862d917c90d4e25e443d5\",\"unread\":false,\"type\":\"mentionedOnCard\",\"date\":\"2017-01-13T05:17:13.213Z\",\"data\":{\"text\":\"@cyammine I wonder what would show up here: 🚝🚆🚉 猜猜看呗\",\"card\":{\"shortLink\":\"1v9vVEkG\",\"idShort\":40,\"name\":\"Coursera: Machine Learning Specialization\",\"id\":\"5852fd3d1179f8f450bccfff\"},\"board\":{\"shortLink\":\"Dj4qhV6Y\",\"name\":\"10K Hrs Practice\",\"id\":\"581123b17cf99a01294434a9\"}},\"idMemberCreator\":\"56e87b654e27da2d988898a0\",\"memberCreator\":{\"id\":\"56e87b654e27da2d988898a0\",\"avatarHash\":null,\"fullName\":\"Meichen Zhou\",\"initials\":\"MZ\",\"username\":\"meichenzhou\"}}]",
"headers": {
"Cache-Control": "max-age=0, must-revalidate, no-cache, no-store",
"X-Content-Type-Options": "nosniff",
"Strict-Transport-Security": "max-age=15768000",
"X-XSS-Protection": "1; mode=block",
"X-FRAME-OPTIONS": "DENY",
"X-Trello-Version": "1.871.0",
"X-Trello-Environment": "Production",
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "GET, PUT, POST, DELETE",
"Access-Control-Allow-Headers": "Authorization, Accept, Content-Type",
"X-Server-Time": "1485022531282",
"Expires": "Thu, 01 Jan 1970 00:00:00",
"Content-Type": "application/json; charset=utf-8",
"Content-Length": "596",
"ETag": "W/\"254-1fd9f7fa\"",
"Vary": "Accept-Encoding",
"Date": "Sat, 21 Jan 2017 18:15:31 GMT",
"Connection": "keep-alive",
"Set-Cookie": "<REMOVED> Secure"
},
"status_code": 200,
"type": "ok"
}
}
]
78 changes: 78 additions & 0 deletions fixtures/vcr_cassettes/mark_notification_read.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
[
{
"request": {
"body": "",
"headers": {
"Authorization": "***"
},
"method": "get",
"options": [],
"request_body": "",
"url": "https://api.trello.com/1/notifications/587862d917c90d4e25e443d5?"
},
"response": {
"body": "{\"id\":\"587862d917c90d4e25e443d5\",\"unread\":true,\"type\":\"mentionedOnCard\",\"date\":\"2017-01-13T05:17:13.213Z\",\"data\":{\"text\":\"@cyammine I wonder what would show up here: 🚝🚆🚉 猜猜看呗\",\"card\":{\"shortLink\":\"1v9vVEkG\",\"idShort\":40,\"name\":\"Coursera: Machine Learning Specialization\",\"id\":\"5852fd3d1179f8f450bccfff\"},\"board\":{\"shortLink\":\"Dj4qhV6Y\",\"name\":\"10K Hrs Practice\",\"id\":\"581123b17cf99a01294434a9\"}},\"idMemberCreator\":\"56e87b654e27da2d988898a0\",\"memberCreator\":{\"id\":\"56e87b654e27da2d988898a0\",\"avatarHash\":null,\"fullName\":\"Meichen Zhou\",\"initials\":\"MZ\",\"username\":\"meichenzhou\"}}",
"headers": {
"Cache-Control": "max-age=0, must-revalidate, no-cache, no-store",
"X-Content-Type-Options": "nosniff",
"Strict-Transport-Security": "max-age=15768000",
"X-XSS-Protection": "1; mode=block",
"X-FRAME-OPTIONS": "DENY",
"X-Trello-Version": "1.871.0",
"X-Trello-Environment": "Production",
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "GET, PUT, POST, DELETE",
"Access-Control-Allow-Headers": "Authorization, Accept, Content-Type",
"X-Server-Time": "1485031406242",
"Expires": "Thu, 01 Jan 1970 00:00:00",
"Content-Type": "application/json; charset=utf-8",
"Content-Length": "593",
"ETag": "W/\"251-ced7cd87\"",
"Vary": "Accept-Encoding",
"Date": "Sat, 21 Jan 2017 20:43:26 GMT",
"Connection": "keep-alive",
"Set-Cookie": "<REMOVED> Secure"
},
"status_code": 200,
"type": "ok"
}
},
{
"request": {
"body": "unread=false",
"headers": {
"Authorization": "***",
"Content-Type": "application/x-www-form-urlencoded"
},
"method": "put",
"options": [],
"request_body": "",
"url": "https://api.trello.com/1/notifications/587862d917c90d4e25e443d5"
},
"response": {
"body": "{\"id\":\"587862d917c90d4e25e443d5\",\"unread\":false,\"type\":\"mentionedOnCard\",\"date\":\"2017-01-13T05:17:13.213Z\",\"data\":{\"text\":\"@cyammine I wonder what would show up here: 🚝🚆🚉 猜猜看呗\",\"card\":{\"shortLink\":\"1v9vVEkG\",\"idShort\":40,\"name\":\"Coursera: Machine Learning Specialization\",\"id\":\"5852fd3d1179f8f450bccfff\"},\"board\":{\"shortLink\":\"Dj4qhV6Y\",\"name\":\"10K Hrs Practice\",\"id\":\"581123b17cf99a01294434a9\"}},\"idMemberCreator\":\"56e87b654e27da2d988898a0\",\"memberCreator\":{\"id\":\"56e87b654e27da2d988898a0\",\"avatarHash\":null,\"fullName\":\"Meichen Zhou\",\"initials\":\"MZ\",\"username\":\"meichenzhou\"}}",
"headers": {
"Cache-Control": "max-age=0, must-revalidate, no-cache, no-store",
"X-Content-Type-Options": "nosniff",
"Strict-Transport-Security": "max-age=15768000",
"X-XSS-Protection": "1; mode=block",
"X-FRAME-OPTIONS": "DENY",
"X-Trello-Version": "1.871.0",
"X-Trello-Environment": "Production",
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "GET, PUT, POST, DELETE",
"Access-Control-Allow-Headers": "Authorization, Accept, Content-Type",
"X-Server-Time": "1485031406713",
"Expires": "Thu, 01 Jan 1970 00:00:00",
"Content-Type": "application/json; charset=utf-8",
"Content-Length": "594",
"ETag": "W/\"252-fe6666b0\"",
"Vary": "Accept-Encoding",
"Date": "Sat, 21 Jan 2017 20:43:26 GMT",
"Connection": "keep-alive"
},
"status_code": 200,
"type": "ok"
}
}
]
Loading

0 comments on commit 8fcbd97

Please sign in to comment.