mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-12 01:54:26 +02:00
API: First steps to support subscriptions
This commit is contained in:
parent
1e305e748d
commit
e28a4265c5
18 changed files with 416 additions and 20 deletions
|
@ -93,7 +93,12 @@ These endpoints use the [Mastodon API entities](https://docs.joinmastodon.org/en
|
|||
- [`POST /api/v1/notifications/clear`](https://docs.joinmastodon.org/methods/notifications/)
|
||||
- [`POST /api/v1/notifications/:id/dismiss`](https://docs.joinmastodon.org/methods/notifications/)
|
||||
- [`GET /api/v1/preferences`](https://docs.joinmastodon.org/methods/accounts/preferences/)
|
||||
- [`DELETE /api/v1/push/subscription`](https://docs.joinmastodon.org/methods/notifications/push/)
|
||||
- [`GET /api/v1/push/subscription`](https://docs.joinmastodon.org/methods/notifications/push/)
|
||||
- [`PUSH /api/v1/push/subscription`](https://docs.joinmastodon.org/methods/notifications/push/)
|
||||
- [`GET /api/v1/scheduled_statuses`](https://docs.joinmastodon.org/methods/statuses/scheduled_statuses/)
|
||||
- [`DELETE /api/v1/scheduled_statuses/:id`](https://docs.joinmastodon.org/methods/statuses/scheduled_statuses/)
|
||||
- [`GET /api/v1/scheduled_statuses/:id`](https://docs.joinmastodon.org/methods/statuses/scheduled_statuses/)
|
||||
- [`GET /api/v1/search`](https://docs.joinmastodon.org/methods/search/)
|
||||
- [`POST /api/v1/statuses`](https://docs.joinmastodon.org/methods/statuses/)
|
||||
- [`GET /api/v1/statuses/:id`](https://docs.joinmastodon.org/methods/statuses/)
|
||||
|
@ -173,13 +178,8 @@ They refer to features or data that don't exist in Friendica yet.
|
|||
- [`POST /api/v1/markers`](https://docs.joinmastodon.org/methods/timelines/markers/)
|
||||
- [`GET /api/v1/polls/:id`](https://docs.joinmastodon.org/methods/statuses/polls/)
|
||||
- [`POST /api/v1/polls/:id/votes`](https://docs.joinmastodon.org/methods/statuses/polls/)
|
||||
- [`DELETE /api/v1/push/subscription`](https://docs.joinmastodon.org/methods/notifications/push/)
|
||||
- [`GET /api/v1/push/subscription`](https://docs.joinmastodon.org/methods/notifications/push/)
|
||||
- [`PUSH /api/v1/push/subscription`](https://docs.joinmastodon.org/methods/notifications/push/)
|
||||
- [`PUT /api/v1/push/subscription`](https://docs.joinmastodon.org/methods/notifications/push/)
|
||||
- [`POST /api/v1/reports`](https://docs.joinmastodon.org/methods/accounts/reports/)
|
||||
- [`GET /api/v1/scheduled_statuses/:id`](https://docs.joinmastodon.org/methods/statuses/scheduled_statuses/)
|
||||
- [`PUT /api/v1/scheduled_statuses/:id`](https://docs.joinmastodon.org/methods/statuses/scheduled_statuses/)
|
||||
- [`DELETE /api/v1/scheduled_statuses/:id`](https://docs.joinmastodon.org/methods/statuses/scheduled_statuses/)
|
||||
- [`GET /api/v1/streaming`](https://docs.joinmastodon.org/methods/timelines/streaming/)
|
||||
- [`DELETE /api/v1/suggestions/:id`](https://docs.joinmastodon.org/methods/accounts/suggestions/)
|
||||
|
|
|
@ -65,6 +65,7 @@ Database Tables
|
|||
| [search](help/database/db_search) | |
|
||||
| [session](help/database/db_session) | web session storage |
|
||||
| [storage](help/database/db_storage) | Data stored by Database storage backend |
|
||||
| [subscription](help/database/db_subscription) | Push Subscription for the API |
|
||||
| [tag](help/database/db_tag) | tags and mentions |
|
||||
| [user](help/database/db_user) | The local users |
|
||||
| [user-contact](help/database/db_user-contact) | User specific public contact data |
|
||||
|
|
42
doc/database/db_subscription.md
Normal file
42
doc/database/db_subscription.md
Normal file
|
@ -0,0 +1,42 @@
|
|||
Table subscription
|
||||
===========
|
||||
|
||||
Push Subscription for the API
|
||||
|
||||
Fields
|
||||
------
|
||||
|
||||
| Field | Description | Type | Null | Key | Default | Extra |
|
||||
| -------------- | ------------------------------ | ------------------ | ---- | --- | ------- | -------------- |
|
||||
| id | Auto incremented image data id | int unsigned | NO | PRI | NULL | auto_increment |
|
||||
| application-id | | int unsigned | NO | | NULL | |
|
||||
| uid | Owner User id | mediumint unsigned | NO | | NULL | |
|
||||
| endpoint | Endpoint URL | varchar(511) | YES | | NULL | |
|
||||
| pubkey | User agent public key | varchar(127) | YES | | NULL | |
|
||||
| secret | Auth secret | varchar(32) | YES | | NULL | |
|
||||
| follow | | boolean | YES | | NULL | |
|
||||
| favourite | | boolean | YES | | NULL | |
|
||||
| reblog | | boolean | YES | | NULL | |
|
||||
| mention | | boolean | YES | | NULL | |
|
||||
| poll | | boolean | YES | | NULL | |
|
||||
| follow_request | | boolean | YES | | NULL | |
|
||||
| status | | boolean | YES | | NULL | |
|
||||
|
||||
Indexes
|
||||
------------
|
||||
|
||||
| Name | Fields |
|
||||
| ------------------ | --------------------------- |
|
||||
| PRIMARY | id |
|
||||
| application-id_uid | UNIQUE, application-id, uid |
|
||||
| uid_application-id | uid, application-id |
|
||||
|
||||
Foreign Keys
|
||||
------------
|
||||
|
||||
| Field | Target Table | Target Field |
|
||||
|-------|--------------|--------------|
|
||||
| application-id | [application](help/database/db_application) | id |
|
||||
| uid | [user](help/database/db_user) | uid |
|
||||
|
||||
Return to [database documentation](help/database)
|
Loading…
Add table
Add a link
Reference in a new issue