// ipx-directory's API under /v1 (crates/directory/src/wire.rs), each message named after the Rust // struct it mirrors. A field added there goes here too; debug builds refuse an answer with a field // missing here. A message whose only field is `repeated items` is a JSON array. syntax = "proto3"; package directory; // GET /v1/me. message Me { string name = 1; // "ro", "rw" or "rwa". string access = 2; } message Listing { string id = 1; string url = 2; optional string title = 3; optional string image = 4; optional string category = 5; optional string subcategory = 6; bool podcast = 7; int64 subscribers = 8; } // GET /v1/feeds, GET /v1/popular. message Listings { repeated Listing items = 1; } message Item { string guid = 1; optional string title = 2; optional string link = 3; optional int64 published = 4; optional int64 duration = 5; optional string description = 6; } // GET /v1/feeds/{id}, POST /v1/feeds/{id}/refresh: a Listing's fields and these. message FeedPage { string id = 1; string url = 2; optional string title = 3; optional string image = 4; optional string category = 5; optional string subcategory = 6; bool podcast = 7; int64 subscribers = 8; optional string description = 9; optional string failing = 10; repeated Item items = 11; } message SnapshotEntry { string url = 1; int64 subscribers = 2; optional string category = 3; } // POST /v1/snapshot, the body. message Snapshot { repeated SnapshotEntry items = 1; } // POST /v1/snapshot, the answer. message SnapshotResult { uint64 accepted = 1; uint64 refused_private = 2; uint64 refused_blocked = 3; uint64 refused_invalid = 4; } message Instance { string name = 1; int64 feeds = 2; int64 subscribers = 3; } // GET /v1/instances. message Instances { repeated Instance items = 1; } message Blocked { string id = 1; optional string url = 2; optional string title = 3; int64 at = 4; } // GET /v1/blocked. message BlockedList { repeated Blocked items = 1; }