From 0c0c299ee1d923aa6e1ac043ea5300549421ea34 Mon Sep 17 00:00:00 2001 From: cameron macfarlane Date: Tue, 16 Feb 2016 10:45:41 -0800 Subject: [PATCH 1/3] added in getPersonsProjects --- src/Basecamp/Resources/service.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/Basecamp/Resources/service.php b/src/Basecamp/Resources/service.php index 6e2cb75..cd599cf 100644 --- a/src/Basecamp/Resources/service.php +++ b/src/Basecamp/Resources/service.php @@ -428,6 +428,19 @@ 'uri' => 'people.json', 'summary' => 'Get all People' . PHP_EOL . '[Basecamp API: People](https://github.com/basecamp/bcx-api/blob/master/sections/people.md)' ), + 'getPersonsProjects' => array( + 'httpMethod' => 'GET', + 'uri' => 'people/{personId}/projects.json', + 'summary' => 'Get projects a person has access to.' . PHP_EOL . '[Basecamp API: People](https://github.com/basecamp/bcx-api/blob/master/ sections/people.md)', + 'parameters' => array( + 'personId' => array( + 'location' => 'uri', + 'description' => 'Person ID', + 'type' => 'integer', + 'required' => true, + ) + ) + ), 'getGroups' => array( 'httpMethod' => 'GET', 'uri' => 'groups.json', @@ -913,4 +926,4 @@ ) ) ) -); \ No newline at end of file +); From 20e3a5cfcf973c38b1e7d30c6350e0ede61cdc66 Mon Sep 17 00:00:00 2001 From: cameron macfarlane Date: Thu, 18 Feb 2016 14:34:46 -0800 Subject: [PATCH 2/3] testing updates --- tests/mock/get_peoples_projects | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 tests/mock/get_peoples_projects diff --git a/tests/mock/get_peoples_projects b/tests/mock/get_peoples_projects new file mode 100644 index 0000000..c383961 --- /dev/null +++ b/tests/mock/get_peoples_projects @@ -0,0 +1,19 @@ +HTTP/1.1 200 OK +Server: nginx +Date: Fri, 12 Apr 2013 12:09:01 GMT +Content-Type: application/json; charset=utf-8 +Transfer-Encoding: chunked +Connection: keep-alive +Status: 200 OK +X-Frame-Options: SAMEORIGIN +X-XSS-Protection: 1; mode=block +X-Content-Type-Options: nosniff +X-UA-Compatible: chrome=1 +X-XHR-Current-Location: /99999999/api/v1/people.json +X-Asset-Paths: {"application.js":"application-d265257400a78c84714eef6d6f34f2ad.js","application.css":"application-f0a5ae63903c0c1d32c6f03cf7bb8c8a.css"} +ETag: "24d3f12354466094e942e6731fb89b68" +Cache-Control: max-age=0, private, must-revalidate +X-Request-Id: 18723020-c8f2-4ddc-b427-9d633ed94fcc +X-Runtime: 0.339996 + +[{"id": 149087659,"identity_id": 982871737,"name": "Jason Fried","email_address": "jason@37signals.com","admin": true,"avatar_url": "https://asset0.37img.com/global/4113d0a133a32931be8934e70b2ea21efeff72c1/avatar.96.gif","created_at": "2012-03-22T16:56:48-05:00","updated_at": "2012-03-22T16:56:48-05:00","url": "https://basecamp.com/99999999/api/v1/people/149087659-jason-fried.json"}] From a601a38ffc54acd13cfded46e94eb66b8e2239e2 Mon Sep 17 00:00:00 2001 From: cameron macfarlane Date: Fri, 19 Feb 2016 10:31:18 -0800 Subject: [PATCH 3/3] added in a test --- tests/mock/get_peoples_projects | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/mock/get_peoples_projects b/tests/mock/get_peoples_projects index c383961..694680a 100644 --- a/tests/mock/get_peoples_projects +++ b/tests/mock/get_peoples_projects @@ -9,11 +9,11 @@ X-Frame-Options: SAMEORIGIN X-XSS-Protection: 1; mode=block X-Content-Type-Options: nosniff X-UA-Compatible: chrome=1 -X-XHR-Current-Location: /99999999/api/v1/people.json +X-XHR-Current-Location: /99999999/api/v1/people/1/projects.json X-Asset-Paths: {"application.js":"application-d265257400a78c84714eef6d6f34f2ad.js","application.css":"application-f0a5ae63903c0c1d32c6f03cf7bb8c8a.css"} ETag: "24d3f12354466094e942e6731fb89b68" Cache-Control: max-age=0, private, must-revalidate X-Request-Id: 18723020-c8f2-4ddc-b427-9d633ed94fcc X-Runtime: 0.339996 -[{"id": 149087659,"identity_id": 982871737,"name": "Jason Fried","email_address": "jason@37signals.com","admin": true,"avatar_url": "https://asset0.37img.com/global/4113d0a133a32931be8934e70b2ea21efeff72c1/avatar.96.gif","created_at": "2012-03-22T16:56:48-05:00","updated_at": "2012-03-22T16:56:48-05:00","url": "https://basecamp.com/99999999/api/v1/people/149087659-jason-fried.json"}] +[{"id": 3660260,"name": "Daylight: Operations","description": "","archived": false,"is_client_project": true,"created_at": "2011-10-28T17:00:00.000-07:00","updated_at": "2016-02-18T10:20:32.000-08:00","trashed": false,"color": "650606","draft": false,"template": false,"last_event_at": "2016-02-18T10:20:32.000-08:00","starred": false,"url": "https://basecamp.com/1759630/api/v1/projects/3660260.json","app_url": "https://basecamp.com/1759630/projects/3660260"}]