API: Support for markers added
This commit is contained in:
parent
90eeacde3c
commit
19772f29f3
7 changed files with 116 additions and 7 deletions
|
|
@ -55,7 +55,7 @@
|
|||
use Friendica\Database\DBA;
|
||||
|
||||
if (!defined('DB_UPDATE_VERSION')) {
|
||||
define('DB_UPDATE_VERSION', 1467);
|
||||
define('DB_UPDATE_VERSION', 1468);
|
||||
}
|
||||
|
||||
return [
|
||||
|
|
@ -449,6 +449,21 @@ return [
|
|||
"client_id" => ["UNIQUE", "client_id"]
|
||||
]
|
||||
],
|
||||
"application-marker" => [
|
||||
"comment" => "Timeline marker",
|
||||
"fields" => [
|
||||
"application-id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["application" => "id"], "comment" => ""],
|
||||
"uid" => ["type" => "mediumint unsigned", "not null" => "1", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
|
||||
"timeline" => ["type" => "varchar(64)", "not null" => "1", "primary" => "1", "comment" => "Marker (home, notifications)"],
|
||||
"last_read_id" => ["type" => "varchar(255)", "comment" => "Marker id for the timeline"],
|
||||
"version" => ["type" => "smallint unsigned", "comment" => "Version number"],
|
||||
"updated_at" => ["type" => "datetime", "comment" => "creation time"],
|
||||
],
|
||||
"indexes" => [
|
||||
"PRIMARY" => ["application-id", "uid", "timeline"],
|
||||
"uid_id" => ["uid"],
|
||||
]
|
||||
],
|
||||
"application-token" => [
|
||||
"comment" => "OAuth user token",
|
||||
"fields" => [
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ return [
|
|||
'/lists' => [Module\Api\Mastodon\Lists::class, [R::GET, R::POST]],
|
||||
'/lists/{id:\d+}' => [Module\Api\Mastodon\Lists::class, [R::GET, R::PUT, R::DELETE]],
|
||||
'/lists/{id:\d+}/accounts' => [Module\Api\Mastodon\Lists\Accounts::class, [R::GET, R::POST, R::DELETE]],
|
||||
'/markers' => [Module\Api\Mastodon\Markers::class, [R::GET, R::POST]], // Dummy, not supported
|
||||
'/markers' => [Module\Api\Mastodon\Markers::class, [R::GET, R::POST]],
|
||||
'/media/{id:\d+}' => [Module\Api\Mastodon\Media::class, [R::GET, R::PUT ]],
|
||||
'/mutes' => [Module\Api\Mastodon\Mutes::class, [R::GET ]],
|
||||
'/notifications' => [Module\Api\Mastodon\Notifications::class, [R::GET ]],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue