|
| 1 | +--- |
| 2 | +title: "Explore Stream" |
| 3 | +--- |
| 4 | + |
| 5 | +# Explore Stream |
| 6 | + |
| 7 | +* TOC |
| 8 | +{:toc} |
| 9 | + |
| 10 | +An Explore Stream is a subset of all public posts flowing through App.net's Global Stream. These Explore Streams are defined by App.net to provide developers and users new ways to discover posts. **We will be adding and removing Explore Streams so in your app please [Retrieve all Explore Streams](#retrieve-all-explore-streams) and cache that list for up to 24 hours instead of hardcoding the current Explore Streams into your app.** |
| 11 | + |
| 12 | +~~~ js |
| 13 | +{ |
| 14 | + "description": "Photos uploaded to App.net", |
| 15 | + "slug": "photos", |
| 16 | + "title": "Photos", |
| 17 | + "url": "https://alpha-api.app.net/stream/0/posts/stream/explore/photos" |
| 18 | +} |
| 19 | +~~~ |
| 20 | + |
| 21 | +## Explore Stream Fields |
| 22 | + |
| 23 | +<table> |
| 24 | + <tr> |
| 25 | + <th>Field</th> |
| 26 | + <th>Type</th> |
| 27 | + <th>Description</th> |
| 28 | + </tr> |
| 29 | + <tr> |
| 30 | + <td><code>slug</code></td> |
| 31 | + <td>string</td> |
| 32 | + <td>Primary identifier for an explore stream. A lowercase alphanumeric string.</td> |
| 33 | + </tr> |
| 34 | + <tr> |
| 35 | + <td><code>title</code></td> |
| 36 | + <td>string</td> |
| 37 | + <td>A human-friendly name for this Explore Stream.</td> |
| 38 | + </tr> |
| 39 | + <tr> |
| 40 | + <td><code>description</code></td> |
| 41 | + <td>string</td> |
| 42 | + <td>A short description of this Explore Stream for displaying to the User.</td> |
| 43 | + </tr> |
| 44 | + <tr> |
| 45 | + <td><code>url</code></td> |
| 46 | + <td>string</td> |
| 47 | + <td>The fully qualified url to the Explore Stream.</td> |
| 48 | + </tr> |
| 49 | +</table> |
| 50 | + |
| 51 | +## Retrieve all Explore Streams |
| 52 | + |
| 53 | +Retrieve a list of all Explore Streams. The list of Explore Streams are dynamic and will sometimes change. **Please cache them for 24 hours in your app.** Also, please note that this endpoint is not paginated. |
| 54 | + |
| 55 | +<%= migration_warning ['response_envelope'] %> |
| 56 | + |
| 57 | +<%= endpoint "GET", "posts/stream/explore", "None" %> |
| 58 | + |
| 59 | +### Parameters |
| 60 | + |
| 61 | +None. |
| 62 | + |
| 63 | +### Example |
| 64 | + |
| 65 | +> GET https://alpha-api.app.net/stream/0/posts/stream/explore |
| 66 | +
|
| 67 | +~~~ js |
| 68 | +{ |
| 69 | + "data": [ |
| 70 | + { |
| 71 | + "description": "Photos uploaded to App.net", |
| 72 | + "slug": "photos", |
| 73 | + "title": "Photos", |
| 74 | + "url": "https://alpha-api.app.net/stream/0/posts/stream/explore/photos" |
| 75 | + }, |
| 76 | + ... |
| 77 | + ], |
| 78 | + "meta": { |
| 79 | + "code": 200 |
| 80 | + } |
| 81 | +} |
| 82 | +~~~ |
| 83 | + |
| 84 | +## Retrieve an Explore Stream |
| 85 | + |
| 86 | +Retrieve the Posts in an Explore Stream. |
| 87 | + |
| 88 | +<%= migration_warning ['response_envelope'] %> |
| 89 | + |
| 90 | +<%= endpoint "GET", "posts/stream/explore/[slug]", "None" %> |
| 91 | + |
| 92 | +### Parameters |
| 93 | + |
| 94 | +<table> |
| 95 | + <thead> |
| 96 | + <tr> |
| 97 | + <th>Name</th> |
| 98 | + <th>Required?</th> |
| 99 | + <th>Type</th> |
| 100 | + <th>Description</th> |
| 101 | + </tr> |
| 102 | + </thead> |
| 103 | + <tbody> |
| 104 | + <tr> |
| 105 | + <td><code>slug</code></td> |
| 106 | + <td>Required</td> |
| 107 | + <td>string</td> |
| 108 | + <td>The <code>slug</code> for this Explore Stream.</td> |
| 109 | + </tr> |
| 110 | + </tbody> |
| 111 | +</table> |
| 112 | + |
| 113 | +### Example |
| 114 | + |
| 115 | +> GET https://alpha-api.app.net/stream/0/posts/stream/explore/photos |
| 116 | +
|
| 117 | +~~~ js |
| 118 | +{ |
| 119 | + "data": [ |
| 120 | + ...posts... |
| 121 | + ], |
| 122 | + "meta": { |
| 123 | + "code": 200, |
| 124 | + "explore_stream": { |
| 125 | + "description": "Photos uploaded to App.net", |
| 126 | + "slug": "photos", |
| 127 | + "title": "Photos", |
| 128 | + "url": "https://alpha-api.app.net/stream/0/posts/stream/explore/photos" |
| 129 | + }, |
| 130 | + "max_id": "3382496", |
| 131 | + "min_id": "3382480", |
| 132 | + "more": true, |
| 133 | + "marker": { |
| 134 | + "name": "explore:photos" |
| 135 | + } |
| 136 | + } |
| 137 | +} |
| 138 | +~~~ |
0 commit comments