rdohms / meetup-api-client

Guzzle powered Meetup.com API Client
MIT License
76 stars 24 forks source link

auto-api conversion #23

Closed rdohms closed 9 years ago

rdohms commented 9 years ago

Use the json version of the api docs: http://api.meetup.com/docs

To generate our services.json files.

This will allow api parity to be done a lot quicker and automated.

rdohms commented 9 years ago

I have successfully written an adapter for this. However due to the nature of the docs and the fact that 1) Meetup does fully grasp consistency and 2) original methods were named by me, manually, one by one, the methods now have different names in some cases.

This is a BC break so this will mean a v2 release and a bit of checking for anyone using the library right now.

How do you all feel about this? It will mean making the client up to date with the API should be a simple command run away, so i can keep up with the undocumented changes that Meetup does without letting us know, a lot easier.

The idea for v2 was to upgrade to new versions of Guzzle, but i'm then thinking i would push that to v3 and take a bit longer with it.

Would like to hear from actual users.

matthiasnoback commented 9 years ago

I'm not a real user ;) But the idea is really cool.

rdohms commented 9 years ago

ok, got a bit more work done on this and this is the result

+--------+------------------------------------+--------+----------------------------------------+--------------------------------+
| v      | Docs Name                          | Method | Path                                   | Final Method Name              |
+--------+------------------------------------+--------+----------------------------------------+--------------------------------+
| 2      | Categories                         | GET    | /2/categories                          | GetCategories                  |
| 3      | Dashboard                          | GET    | /dashboard                             | GetDashboard                   |
| 2      | Topic Categories                   | GET    | /2/topic_categories                    | GetTopicCategories             |
| 1      | Topics                             | GET    | /topics                                | GetTopics                      |
| 2      | OpenEvents                         | GET    | /2/open_events                         | GetOpenEvents                  |
| 2      | Concierge                          | GET    | /2/concierge                           | GetConcierge                   |
| 2      | Groups                             | GET    | /2/groups                              | GetGroups                      |
| 2      | Events                             | GET    | /2/events                              | GetEvents                      |
| 2      | Event Create                       | POST   | /2/event                               | CreateEvent                    |
| 2      | Event Edit                         | POST   | /2/event/:id                           | EditEvent                      |
| 2      | Event Get                          | GET    | /2/event/:id                           | GetEvent                       |
| 2      | Event Delete                       | DELETE | /2/event/:id                           | DeleteEvent                    |
| 2      | Cities                             | GET    | /2/cities                              | GetCities                      |
| 2      | Members                            | GET    | /2/members                             | GetMembers                     |
| 2      | Member Get                         | GET    | /2/member/:id                          | GetMember                      |
| 2      | Member Edit                        | POST   | /2/member/:id                          | EditMember                     |
| 2      | Profiles                           | GET    | /2/profiles                            | GetProfiles                    |
| 2      | Profile Create (Group Join)        | POST   | /2/profile                             | CreateProfile                  |
| 2      | Profile Edit                       | POST   | /2/profile/:gid/:mid                   | EditProfile                    |
| 2      | Profile Get                        | GET    | /2/profile/:gid/:mid                   | GetProfile                     |
| 2      | Profile Delete (Leave Group)       | DELETE | /2/profile/:gid/:mid                   | DeleteProfile                  |
| 2      | Photo Delete                       | DELETE | /2/photo/:id                           | DeletePhoto                    |
| 2      | Member Photo Delete                | DELETE | /2/member_photo/:id                    | DeleteMemberPhoto              |
| 1      | Comments                           | GET    | /comments                              | GetComments                    |
| 2      | Comments v2                        | GET    | /2/event_comments                      | GetEventComments               |
| 2      | Event Comment v2                   | POST   | /2/event_comment                       | CreateEventComment             |
| 2      | Event Comment Get                  | GET    | /2/event_comment/:id                   | GetEventComment                |
| 2      | Event Comment Delete               | DELETE | /2/event_comment/:id                   | DeleteEventComment             |
| 2      | Event Comment Flag                 | POST   | /2/event_comment_flag                  | CreateEventCommentFlag         |
| 2      | Event Comment Unsubscribe          | DELETE | /2/event_comment_subscribe/:id         | DeleteEventCommentSubscribe    |
| 2      | Event Comment Subscribe            | POST   | /2/event_comment_subscribe/:id         | EditEventCommentSubscribe      |
| 2      | Event Comment Like                 | POST   | /2/event_comment_like/:id              | EditEventCommentLike           |
| 2      | Event Comment Unlike               | DELETE | /2/event_comment_like/:id              | DeleteEventCommentLike         |
| 2      | Comment Likes                      | GET    | /2/event_comment_likes                 | GetEventCommentLikes           |
| 2      | Photo Comments v2                  | GET    | /2/photo_comments                      | GetPhotoComments               |
| 2      | Photo Comment v2                   | POST   | /2/photo_comment                       | CreatePhotoComment             |
| 2      | Ratings v2                         | GET    | /2/event_ratings                       | GetEventRatings                |
| 2      | Event Rating                       | POST   | /2/event_rating                        | CreateEventRating              |
| 2      | Photo Albums                       | GET    | /2/photo_albums                        | GetPhotoAlbums                 |
| 2      | Photos                             | GET    | /2/photos                              | GetPhotos                      |
| 2      | Photo Album2                       | POST   | /2/photo_album                         | CreatePhotoAlbum               |
| 2      | OpenVenues                         | GET    | /2/open_venues                         | GetOpenVenues                  |
| 2      | Venues                             | GET    | /2/venues                              | GetVenues                      |
| 2      | RSVPs v2                           | GET    | /2/rsvps                               | GetRsvps                       |
| 2      | RSVP Create/Update                 | POST   | /2/rsvp                                | CreateRsvp                     |
| 2      | RSVP Get                           | GET    | /2/rsvp/:id                            | GetRsvp                        |
| 2      | Group Photo Upload                 | POST   | /2/group_photo                         | CreateGroupPhoto               |
| 2      | Member Photo Upload                | POST   | /2/member_photo                        | CreateMemberPhoto              |
| 2      | Event Photo Upload                 | POST   | /2/photo                               | CreatePhoto                    |
| 1      | ActivityFeed                       | GET    | /activity                              | GetActivity                    |
| 1      |                                    |        | /widget                                | Widget                         |
| 1      |                                    |        | /widget_query                          | WidgetQuery                    |
| 1      | oEmbed                             | GET    | /oembed                                | GetOembed                      |
| stream | Long-Polling RSVP Stream           | GET    | /2/rsvps                               | GetRsvpsStream                 |
| stream | WebSockets RSVP Stream             | WS     | /2/rsvps                               | WebSocketRsvpsStream           |
| stream | Chunked HTTP RSVP Stream           | GET    | /2/rsvps                               | GetRsvpsStream                 |
| stream | OpenEvents Stream                  | GET    | /2/open_events                         | GetOpenEventsStream            |
| stream | Long-Polling Photo Stream          | GET    | /2/photos                              | GetPhotosStream                |
| stream | WebSocket Photo Stream             | WS     | /2/photos                              | WebSocketPhotosStream          |
| stream | Chunked HTTP Photo Stream          | GET    | /2/photos                              | GetPhotosStream                |
| stream | Chunked HTTP Open Venues Stream    | GET    | /2/open_venues                         | GetOpenVenuesStream            |
| stream | Long-Polling Event Comments Stream | GET    | /2/event_comments                      | GetEventCommentsStream         |
| stream | WebSockets Event Comments Stream   | WS     | /2/event_comments                      | WebSocketEventCommentsStream   |
| stream | Chunked HTTP Event Comments Stream | GET    | /2/event_comments                      | GetEventCommentsStream         |
| 3      | API Status                         | GET    | /status                                | GetStatus                      |
| 3      | Block status                       | GET    | /self/blocks/:member_id                | GetSelfBlocks                  |
| 3      | Block member                       | POST   | /self/blocks/:member_id                | CreateSelfBlocks               |
| 3      | Report Abuse                       | POST   | /self/abuse_reports                    | CreateSelfAbuseReports         |
| 3      | Unblock member                     | DELETE | /self/blocks/:member_id                | DeleteSelfBlocks               |
| 3      | Membership Approval                | POST   | /:urlname/member/approvals             | CreateGroupMemberApprovals     |
| 3      | Attendance                         | GET    | /:urlname/events/:id/attendance        | GetGroupEventsAttendance       |
| 3      | Attendance Taking                  | POST   | /:urlname/events/:id/attendance        | EditGroupEventsAttendance      |
| 3      | batch                              | POST   | /batch                                 | CreateBatch                    |
| 3      | Discussion Boards                  | GET    | /:urlname/boards                       | GetGroupBoards                 |
| 3      | Group Venues                       | GET    | /:urlname/venues                       | GetGroupVenues                 |
| 3      | Membership Decline                 | DELETE | /:urlname/member/approvals             | DeleteGroupMemberApprovals     |
| 3      | Discussions                        | GET    | /:urlname/boards/:bid/discussions      | GetGroupBoardsDiscussions      |
| 3      | Discussion Posts                   | GET    | /:urlname/boards/:bid/discussions/:did | GetGroupBoardsDiscussions      |
| 3      | Event Payments                     | POST   | /:urlname/events/:id/payments          | EditGroupEventsPayments        |
| 3      | Find Groups                        | GET    | /find/groups                           | GetFindGroups                  |
| 3      | Get Group                          | GET    | /:urlname                              | GetGroup                       |
| 3      | Group Edit                         | POST   | /:urlname                              | EditGroup                      |
| 3      | Group Topics Add                   | POST   | /:urlname/topics                       | CreateGroupTopics              |
| 3      | Group Topics Remove                | DELETE | /:urlname/topics                       | DeleteGroupTopics              |
| 3      | Notifications                      | GET    | /notifications                         | GetNotifications               |
| 3      | Read Notifications                 | POST   | /notifications/read                    | CreateNotificationsRead        |
| 3      | Recommend Group Topics             | GET    | /recommended/group_topics              | GetRecommendedGroupTopics      |
| 3      | Recommended Groups                 | GET    | /recommended/groups                    | GetRecommendedGroups           |
| 3      | Recommended Groups Ignore          | POST   | /recommended/groups/ignores/:urlname   | CreateRecommendedGroupsIgnores |
| 3      | Recommended Venues                 | GET    | /recommended/venues                    | GetRecommendedVenues           |
| 3      | Similar groups                     | GET    | /:urlname/similar_groups               | GetGroupSimilarGroups          |
| 3      | Venue Create                       | POST   | /:urlname/venues                       | CreateGroupVenues              |
| 3      | Watchlist add                      | POST   | /:urlname/events/:id/watchlist         | EditGroupEventsWatchlist       |
| 3      | Watchlist remove                   | DELETE | /:urlname/events/:id/watchlist         | DeleteGroupEventsWatchlist     |
+--------+------------------------------------+--------+----------------------------------------+--------------------------------+