鄉民關心你 - API

編輯歷史

時間 作者 版本
2016-06-12 06:03 Chia-liang Kao r4422
顯示 diff
鄉民關心你 - API
+ 本內容已被標註為過時或未維護。如果三十日內沒有更新,將會被移除。原有內容仍可在 https://github.com/g0v-data/hackpad-backup-g0v 找到。
Version: 0.1
(130 行未修改)
2013-11-03 16:35 – 16:35 HisnYi Chen r4413 – r4421
顯示 diff
(131 行未修改)
*supportors: []
*againstors: []
-
- E
2013-11-03 16:35 (unknown) r4412
顯示 diff
(135 行未修改)
2013-11-03 16:35 – 16:35 HisnYi Chen r4410 – r4411
顯示 diff
(131 行未修改)
*supportors: []
*againstors: []
+
+ E
2013-10-10 07:55 – 07:58 HisnYi Chen r4321 – r4409
顯示 diff
(111 行未修改)
*Issues
+ Issue (爭議)
GET /collections/issues
(5 行未修改)
*watcher:
- *Standpoints
+ *Positions
- GET /collections/standpoints
+ GET /collections/positions
*_id: object id
- *issue: ...
- *title: standpoint title
+ *issue:
+ *title: position title
*tags: ....
*supportors: []
(1 行未修改)
2013-09-07 15:24 – 15:43 HisnYi Chen r3928 – r4320
顯示 diff
(8 行未修改)
*Auth
+ git:master: unsupported
+ git:develop: support
GET /auth/facebook # authenticated by facebook account. (default enabled)
- GET /auth/twitter # authenticated by twitter account (default disabled)
- GET /auth/google # authenticated by gooogle account (default disabled)
GET /me # get authenticatied user profile
GET /logout # logout, clear session
(1 行未修改)
*User
+ git:master: unsupported
+ git:develop: support
PUT /collections/users/{id} # update a user
(10 行未修改)
*photos: array
- User Preferences
+ *User Preferences
GET /collection/user_prefs/{user id} #get a user preference
(6 行未修改)
*tags: subscribed tags
- Bookmarked Items
+ *Bookmarked Items
POST /collections/bookmarks/ # create a bookmarked item
(52 行未修改)
- POST /tags # create a tagGET /tags/{tag name}
+ POST /collections/tags # create a tagGET / tcollections/ags/{tag name}
# get a tag by name
- GET /tags/{id} # get a tag by id
+ GET /collections/tags/{id} # get a tag by id
*id: tag id
*name: tag name
*authors: Array of authors
+ *is_issue: return true if at least a user think this tag is an issue title.
*Issues
- standpoint
+ GET /collections/issues
+ GET /collections/issues/{id}
+
+ *tag_id:
+ *bookmarked_items
+ *ongoing_actions
+ *watcher:
+
+ *Standpoints
+
+ GET /collections/standpoints
+
+ *_id: object id
+ *issue: ...
+ *title: standpoint title
+ *tags: ....
+ *supportors: []
+ *againstors: []
2013-09-07 15:24 (unknown) r3927
顯示 diff
(112 行未修改)
2013-09-07 15:23 – 15:24 HisnYi Chen r3907 – r3926
顯示 diff
(105 行未修改)
*name: tag name
*authors: Array of authors
+
+
+ *Issues
+
+ standpoint
2013-09-07 15:23 (unknown) r3906
顯示 diff
(107 行未修改)
2013-09-07 15:21 – 15:23 HisnYi Chen r3903 – r3905
顯示 diff
(12 行未修改)
GET /auth/twitter # authenticated by twitter account (default disabled)
GET /auth/google # authenticated by gooogle account (default disabled)
- GET /me # get authenticatied user profile (default disabled)
+ GET /me # get authenticatied user profile
GET /logout # logout, clear session
GET /logged # return true if user is authenticatied otherwise return false
(90 行未修改)
2013-09-07 09:30 – 10:18 HisnYi Chen r3558 – r3902
顯示 diff
(7 行未修改)
this api is possibled changed by implemented within json-ld (https://www.youtube.com/watch?v=tRTD2W4W8G4)
- *DB Level
+ *Auth
- User
+ GET /auth/facebook # authenticated by facebook account. (default enabled)
+ GET /auth/twitter # authenticated by twitter account (default disabled)
+ GET /auth/google # authenticated by gooogle account (default disabled)
+ GET /me # get authenticatied user profile (default disabled)
+ GET /logout # logout, clear session
+ GET /logged # return true if user is authenticatied otherwise return false
- POST /collections/users/ # create a user
+ *User
+
PUT /collections/users/{id} # update a user
GET /collections/users # get all user
GET /collections/users/{id} # get a user
- DELETE /collections/users/{id} # delete a user
- *id: user id
- *provider_name: The provider which with the user authenticated (facebook, twitter, etc.).
- *provider_id: A unique identifier for the user, as generated by the service provider.
+ *_id: user id
*username: The name of this user, suitable for display.
*name:
(2 行未修改)
*middleName: The middle name of this user.
*display_name: the name a user want to display in the system
- *emails: array
*photos: array
+
+ User Preferences
+
+ GET /collection/user_prefs/{user id} #get a user preference
+ PUT /collection/user_prefs/{user id} #get a user preference
+
+ *_id: object id
+ *user_id: user id
*prefer_poston: which system user prefer to use for posting a message (twitter/facebook/kunasim)
- *tokens: JSON, 3rd authz tokes.
*subscriptions
*tags: subscribed tags
(7 行未修改)
DELETE /collections/bookmarks/{id} # delete a bookmarked item (won't delete resolved items, e.x article)
- *id: Item id
+ *_id: Item id
*normal_url: The original url for the added item
*resolved_id: A unique identifier for the resolved item
(52 行未修改)
2013-08-24 11:49 – 12:12 HisnYi Chen r3502 – r3557
顯示 diff
(4 行未修改)
*Background
The backend is custom pgrest and the api is compatable with https://support.mongolab.com/entries/20433053-rest-api-for-mongodb
+
+ this api is possibled changed by implemented within json-ld (https://www.youtube.com/watch?v=tRTD2W4W8G4)
*DB Level
(88 行未修改)
2013-08-12 07:43 Hong-Bin Tsai r3501
顯示 diff
(96 行未修改)
2013-08-07 15:04 – 15:05 HisnYi Chen r3457 – r3500
顯示 diff
(27 行未修改)
*photos: array
*prefer_poston: which system user prefer to use for posting a message (twitter/facebook/kunasim)
- *tokens: JSON
+ *tokens: JSON, 3rd authz tokes.
*subscriptions
- *tags
- *people
+ *tags: subscribed tags
Bookmarked Items
(62 行未修改)
2013-08-07 15:04 (unknown) r3456
顯示 diff
(97 行未修改)
2013-08-07 15:04 – 15:04 HisnYi Chen r3446 – r3455
顯示 diff
鄉民關心你 - API
+
+ Version: 0.1
*Background
(90 行未修改)
*name: tag name
*authors: Array of authors
- Messages
-
- GET /messages/{message id}
-
- *id: message id:
-
-
- *resolved_id
- *resolved_url
- *carrier
- *facebook/g+/plurk/kuansim*fowner
- *fulltext
- :*tags
- :*people
- :
2013-08-01 12:39 – 12:50 HisnYi Chen r3175 – r3445
顯示 diff
(1 行未修改)
*Background
- The backend is pgrest.
-
- and the api is compatable with https://support.mongolab.com/entries/20433053-rest-api-for-mongodb
+ The backend is custom pgrest and the api is compatable with https://support.mongolab.com/entries/20433053-rest-api-for-mongodb
*DB Level
(1 行未修改)
User
- POST /collections/users/ # create a user
- PUT /collections/users/{user id} # update a user
- GET /collections/users # get all user
- GET /collections/users/{user id} # get a user
- DELETE /collections/users/{user id} # delete a user
+ POST /collections/users/ # create a user
+ PUT /collections/users/{id} # update a user
+ GET /collections/users # get all user
+ GET /collections/users/{id} # get a user
+ DELETE /collections/users/{id} # delete a user
*id: user id
+ *provider_name: The provider which with the user authenticated (facebook, twitter, etc.).
+ *provider_id: A unique identifier for the user, as generated by the service provider.
+ *username: The name of this user, suitable for display.
+ *name:
+ *familyName:The family name of this user, or "last name" in most Western languages.
+ *givenName:The given name of this user, or "first name" in most Western languages.
+ *middleName: The middle name of this user.
*display_name: the name a user want to display in the system
+ *emails: array
+ *photos: array
*prefer_poston: which system user prefer to use for posting a message (twitter/facebook/kunasim)
+ *tokens: JSON
*subscriptions
*tags
*people
-
- GET /users/{user id}/items - get bookmarked items of a user
Bookmarked Items
- POST /collections/items/ # create a bookmarked item
- GET /collections/items/
- GET /collections/items/{item_id} # get a bookmarked item
- PUT /collections/items/{item_id} # update a bookmarked item
- DELETE /collections/items/{item_id} # delete a bookmarked item (won't delete resolved items, e.x article)
+ POST /collections/bookmarks/ # create a bookmarked item
+ GET /collections/bookmarks/ # get all bookmarked items
+ GET /collections/bookmarks/{id} # get a bookmarked item
+ PUT /collections/bookmarks/{id} # update a bookmarked item
+ DELETE /collections/bookmarks/{id} # delete a bookmarked item (won't delete resolved items, e.x article)
*id: Item id
(6 行未修改)
*tags: Array of tags
*messages: associated messages
- *in_inbox:
- : no, 1: yes
+ *in_inbox: false or true
AArticles (belongs to resolved items)
(36 行未修改)
POST /tags # create a tagGET /tags/{tag name}
- # get a tag
+ # get a tag by name
+ GET /tags/{id} # get a tag by id
*id: tag id
*name: tag name
- *system_defined:
- : no , 1: user defined
*authors: Array of authors
-
- system tags:
-
- *inbox
Messages
(11 行未修改)
:*people
:
- Events
-
- *id
- *creator
- *authors
- *date_created
- *date_lastmodifed
- *date_started
- *date_end
- *location
- *people
- *tags
- *items
2013-07-20 08:45 – 08:49 HisnYi Chen r2964 – r3174
顯示 diff
鄉民關心你 - API
- ------------------------------------------------------------------------------------------------------------------------
+ *Background
The backend is pgrest.
and the api is compatable with https://support.mongolab.com/entries/20433053-rest-api-for-mongodb
- -------------------------------------------------------------------------------------------------------------------------
+ *DB Level
User
(113 行未修改)
2013-07-20 05:45 – 06:10 HisnYi Chen r2415 – r2963
顯示 diff
鄉民關心你 - API
+
+ ------------------------------------------------------------------------------------------------------------------------
+ The backend is pgrest.
+
+ and the api is compatable with https://support.mongolab.com/entries/20433053-rest-api-for-mongodb
+
+ -------------------------------------------------------------------------------------------------------------------------
User
- POST /users/
-
- GET /users/{user id}
+
+ POST /collections/users/ # create a user
+ PUT /collections/users/{user id} # update a user
+ GET /collections/users # get all user
+ GET /collections/users/{user id} # get a user
+ DELETE /collections/users/{user id} # delete a user
*id: user id
(8 行未修改)
Bookmarked Items
- GET /items/{item_id}
+ POST /collections/items/ # create a bookmarked item
+ GET /collections/items/
+ GET /collections/items/{item_id} # get a bookmarked item
+ PUT /collections/items/{item_id} # update a bookmarked item
+ DELETE /collections/items/{item_id} # delete a bookmarked item (won't delete resolved items, e.x article)
*id: Item id
(9 行未修改)
: no, 1: yes
AArticles (belongs to resolved items)
- *read-only
-
- GET /articles/{article id}
+ POST /articles # create a article
+ ET /articles/{article id}
+ # get a article
*id: article id
*title: article title
(14 行未修改)
WebPages (belongs to resolved items)
- GET /webpages/{id}
+ POST /webpages # create a webpages
+ GET /webpages/{item_id} # get a webpages
*id: web page id
(9 行未修改)
Tags
- GET /tags/{tag name}
+ POST /tags # create a tagGET /tags/{tag name}
+ # get a tag
*id: tag id
*name: tag name
(35 行未修改)
2013-07-19 14:30 – 14:31 Kuang-Che Liu r2388 – r2414
顯示 diff
(1 行未修改)
User
-
+ POST /users/
+
GET /users/{user id}
(100 行未修改)
2013-07-14 10:19 – 10:22 HisnYi Chen r2266 – r2387
顯示 diff
(36 行未修改)
*title: article title
- *canonical_url: permanent url of original article.*summary: article summary
+ *permanent_url: permanent url of original article.*summary: article summary
*fulltext: aticle full content
*date_published: The date the item was published
(5 行未修改)
*has_diffs:
: no; 1: has multiple versions*diffs: Array of changes if this article has multiple version
+
+
+
+ WebPages (belongs to resolved items)
+ GET /webpages/{id}
+ *id: web page id
+ *title: article title
+ *summary: summary of web page
+ *permanent_url: permanent url of original article.
+ *date_published: The date the item was published
+ *domain: domain of url
+ *has_images: 0: no image; 1: has an image in the body of the article; 2: is an image
+ *images: Array of image data
+ *has_videos: 0: no video; 1: has a video in the body of the article; 2: is a video
+ *videos: Array of video data
Tags
(39 行未修改)
2013-07-14 08:33 – 08:33 Kuang-Che Liu r2264 – r2265
顯示 diff
(7 行未修改)
*display_name: the name a user want to display in the system
*prefer_poston: which system user prefer to use for posting a message (twitter/facebook/kunasim)
- *subscribtions
+ *subscriptions
*tags
*people
(79 行未修改)
2013-07-14 05:42 – 05:42 Chia-liang Kao r2262 – r2263
顯示 diff
(28 行未修改)
*in_inbox:
: no, 1: yes
- Articles (belongs to resolved items)
-
+ AArticles (belongs to resolved items)
*read-only
(58 行未修改)
2013-07-13 09:02 – 09:11 HisnYi Chen r1937 – r2261
顯示 diff
(22 行未修改)
*resolved_type: The type resolved item belongs to
*date_resolved: The date the item was resolved
- *authors: Array of author data (if author(s) were found)
+ *date_happend: 事件發生的時間
+ *author:author
*tags: Array of tags
*messages: associated messages
(8 行未修改)
*id: article id
*title: article title
- *summary: article summary
+
+ *canonical_url: permanent url of original article.*summary: article summary
*fulltext: aticle full content
*date_published: The date the item was published
(26 行未修改)
*id: message id:
- *from:
- *to:
- *fulltext
- *carrier
- *facebook/g+/plurk/....
+
*resolved_id
*resolved_url
- *tags
- *people
-
+ *carrier
+ *facebook/g+/plurk/kuansim*fowner
+ *fulltext
+ :*tags
+ :*people
+ :
Events
(11 行未修改)
2013-06-16 11:51 – 12:47 HisnYi Chen r784 – r1936
顯示 diff
鄉民關心你 - API
+
+ User
+
+ GET /users/{user id}
+
+ *id: user id
+ *display_name: the name a user want to display in the system
+ *prefer_poston: which system user prefer to use for posting a message (twitter/facebook/kunasim)
+ *subscribtions
+ *tags
+ *people
+
+ GET /users/{user id}/items - get bookmarked items of a user
Bookmarked Items
(2 行未修改)
*id: Item id
- *title: The title of the resolved_url
*normal_url: The original url for the added item
*resolved_id: A unique identifier for the resolved item
*resolved_type: The type resolved item belongs to
- *resolved_url: The resolved url for the added item. The easiest way to think about the resolved_url - if you add a bit.ly link, the resolved_url will be the url of the page the bit.ly link points to
- *domain_id: A unique identifier for the domain of the resolved_url
- *origin_domain_id: A unique identifier for the domain of the normal_url
- *response_code: The response code received by the Pocket parser when it tried to access the item
*date_resolved: The date the item was resolved
- *date_published: The date the item was published (if the parser was able to find one)
*authors: Array of author data (if author(s) were found)
*tags: Array of tags
*messages: associated messages
+ *in_inbox:
+ : no, 1: yes
+ Articles (belongs to resolved items)
- Articles (belongs to resolved items)
+ *read-only
GET /articles/{article id}
(11 行未修改)
*has_diffs:
: no; 1: has multiple versions*diffs: Array of changes if this article has multiple version
+
+
+ Tags
+
+ GET /tags/{tag name}
+
+ *id: tag id
+ *name: tag name
+ *system_defined:
+ : no , 1: user defined
+ *authors: Array of authors
+ system tags:
+ *inbox
Messages
GET /messages/{message id}
- -
+ *id: message id:
+
+ *from:
+ *to:
+ *fulltext
+ *carrier
+ *facebook/g+/plurk/....
+ *resolved_id
+ *resolved_url
+ *tags
+ *people
+
+ Events
+
+ *id
+ *creator
+ *authors
+ *date_created
+ *date_lastmodifed
+ *date_started
+ *date_end
+ *location
+ *people
+ *tags
+ *items
2013-06-16 11:51 (unknown) r783
顯示 diff
(44 行未修改)
2013-06-16 11:51 – 11:51 HisnYi Chen r757 – r782
顯示 diff
(37 行未修改)
- M
+ Messages
+
+ GET /messages/{message id}
+
+ -
2013-06-16 11:51 (unknown) r756
顯示 diff
(40 行未修改)
2013-06-16 11:34 – 11:51 HisnYi Chen r257 – r755
顯示 diff
鄉民關心你 - API
- Item
+ Bookmarked Items
+
+ GET /items/{item_id}
*id: Item id
(1 行未修改)
*normal_url: The original url for the added item
*resolved_id: A unique identifier for the resolved item
+ *resolved_type: The type resolved item belongs to
*resolved_url: The resolved url for the added item. The easiest way to think about the resolved_url - if you add a bit.ly link, the resolved_url will be the url of the page the bit.ly link points to
*domain_id: A unique identifier for the domain of the resolved_url
(3 行未修改)
*date_published: The date the item was published (if the parser was able to find one)
*authors: Array of author data (if author(s) were found)
- *tags: associated tags
+ *tags: Array of tags
+ *messages: associated messages
- R
+ Articles (belongs to resolved items)
+
+ GET /articles/{article id}
+
+ *id: article id
+ *title: article title
+ *summary: article summary
+ *fulltext: aticle full content
+ *date_published: The date the item was published
+ *sources: Array of sources where the article from
+ *has_images: 0: no image; 1: has an image in the body of the article; 2: is an image
+ *images: Array of image data
+ *has_videos: 0: no video; 1: has a video in the body of the article; 2: is a video
+ *videos: Array of video data
+ *has_diffs:
+ : no; 1: has multiple versions*diffs: Array of changes if this article has multiple version
+
+
+ M
2013-06-16 11:34 (unknown) r256
顯示 diff
(18 行未修改)
2013-06-16 11:33 – 11:34 HisnYi Chen r242 – r255
顯示 diff
(13 行未修改)
*date_published: The date the item was published (if the parser was able to find one)
*authors: Array of author data (if author(s) were found)
+ *tags: associated tags
+
+ R
2013-06-16 11:33 (unknown) r241
顯示 diff
(15 行未修改)
2013-06-16 11:25 – 11:33 HisnYi Chen r37 – r240
顯示 diff
鄉民關心你 - API
-
- POST /items
-
- There is 2 kind of items, a bookmarked uri and a note.
- {
- 'tags': 'a, b,c',
- 'comment': 'test 12345'
- }
-
- {
- 'normal_url',
- 'tags': 'a, b,c '
- 'comment': 'test1233'
- }
-
- GET|PUT /items/$id :: Int
-
- {
- 'title: 'the title of the item',
- 'creator': 'the guy creates this item'
- 'date_published': 'the date that item is added',
- 'resolved_url': 'the resovled url of the item if it has',
- 'tags': [123213,43432,43221], # the ids of the tags be associated
- 'messages': [12345, 123232, 4342, 12321321] # the ids of the message be associated
- }
-
- POST /tags
-
- {
- 'creator': 'the user id creates this tag'
- 'name': 'tag name',
- 'sharring_type': 0 # 0: public, private
- 'kind': 'human' # to indicate this is a special tag.
- 'properties' : {a json} # if this tag is belongs to a human kind, then its properties could be
- {current_positions: [tagId, tagId2], phones: [tagId41, tagId99]}
- }
-
- GET|PUT /tags/$tag_id :: String
-
- {
- 'name'' : 'tag name',
- 'kind': 'the kind of a tag' # optional
- 'messages': [123213,432432, 4234324],
- 'users' [321321,432432,432432,432432]
- }
-
- GET /users/hychen/tags/$tag_id :: String
-
- {
- 'name': 'tag name',
- 'owner': {'id': 1, 'collection_type'}
- *'self_link': '',
- *'display_name':''
- *'primary_email':''}
- 'messages': [12334, 312321, 31321]}
- /kinds/$Id :: Int # kind is also a tag but can only dfined by system provider.
- {
- 'name': 'tag name',
- 'properties_spec',
- 'tags': .....
- }
+ Item
- e.x: /kinds/people # list all people
- /kinds/phones # list all phones
+ *id: Item id
+ *title: The title of the resolved_url
+ *normal_url: The original url for the added item
+ *resolved_id: A unique identifier for the resolved item
+ *resolved_url: The resolved url for the added item. The easiest way to think about the resolved_url - if you add a bit.ly link, the resolved_url will be the url of the page the bit.ly link points to
+ *domain_id: A unique identifier for the domain of the resolved_url
+ *origin_domain_id: A unique identifier for the domain of the normal_url
+ *response_code: The response code received by the Pocket parser when it tried to access the item
+ *date_resolved: The date the item was resolved
+ *date_published: The date the item was published (if the parser was able to find one)
+ *authors: Array of author data (if author(s) were found)
2013-06-13 15:54 – 15:54 HisnYi Chen r12 – r36
顯示 diff
- Kuansim API
-
- API
+ 鄉民關心你 - API
POST /items
(63 行未修改)
2013-06-08 09:39 – 09:39 HisnYi Chen r10 – r11
顯示 diff
- Kuamsim API
+ Kuansim API
API
(65 行未修改)
2013-06-08 06:00 – 06:02 HisnYi Chen r1 – r9
顯示 diff
- Untitled
+ Kuamsim API
- This pad text is synchronized as you type, so that everyone viewing this page sees the same text. This allows you to collaborate seamlessly on documents!
+ API
+
+ POST /items
+
+ There is 2 kind of items, a bookmarked uri and a note.
+ {
+ 'tags': 'a, b,c',
+ 'comment': 'test 12345'
+ }
+
+ {
+ 'normal_url',
+ 'tags': 'a, b,c '
+ 'comment': 'test1233'
+ }
+
+ GET|PUT /items/$id :: Int
+
+ {
+ 'title: 'the title of the item',
+ 'creator': 'the guy creates this item'
+ 'date_published': 'the date that item is added',
+ 'resolved_url': 'the resovled url of the item if it has',
+ 'tags': [123213,43432,43221], # the ids of the tags be associated
+ 'messages': [12345, 123232, 4342, 12321321] # the ids of the message be associated
+ }
+
+ POST /tags
+
+ {
+ 'creator': 'the user id creates this tag'
+ 'name': 'tag name',
+ 'sharring_type': 0 # 0: public, private
+ 'kind': 'human' # to indicate this is a special tag.
+ 'properties' : {a json} # if this tag is belongs to a human kind, then its properties could be
+ {current_positions: [tagId, tagId2], phones: [tagId41, tagId99]}
+ }
+
+ GET|PUT /tags/$tag_id :: String
+
+ {
+ 'name'' : 'tag name',
+ 'kind': 'the kind of a tag' # optional
+ 'messages': [123213,432432, 4234324],
+ 'users' [321321,432432,432432,432432]
+ }
+
+ GET /users/hychen/tags/$tag_id :: String
+
+ {
+ 'name': 'tag name',
+ 'owner': {'id': 1, 'collection_type'}
+ *'self_link': '',
+ *'display_name':''
+ *'primary_email':''}
+ 'messages': [12334, 312321, 31321]}
+
+ /kinds/$Id :: Int # kind is also a tag but can only dfined by system provider.
+ {
+ 'name': 'tag name',
+ 'properties_spec',
+ 'tags': .....
+ }
+
+ e.x: /kinds/people # list all people
+ /kinds/phones # list all phones
2013-06-08 06:00 (unknown) r0
顯示 diff
+ Untitled
+ This pad text is synchronized as you type, so that everyone viewing this page sees the same text. This allows you to collaborate seamlessly on documents!