File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
sessions/Season-05/0505-ApiDesignAndDevelopment Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,25 @@ Returns data and an indicator like `next_cursor` so you can make your next reque
55
55
/products?cursor=hijkl&limit=10
56
56
```
57
57
58
+ ** Notable API:** Twitch does this with their [ ` GetStreams ` API] ( https://dev.twitch.tv/docs/api/reference#get-streams )
59
+
60
+ ```
61
+ GET https://api.twitch.tv/helix/streams?after=abcdefgh12345
62
+ ```
63
+
64
+ Returns:
65
+
66
+ ``` json
67
+ "data" : [
68
+ ...
69
+ ],
70
+ "pagination" : {
71
+ "cursor" : " ghijk1234"
72
+ }
73
+ }
74
+ ```
75
+
76
+
58
77
### Offset/Count paging
59
78
60
79
```
@@ -63,6 +82,12 @@ Returns data and an indicator like `next_cursor` so you can make your next reque
63
82
64
83
Returns 10 records starting with record #11
65
84
85
+ ** Notable API:*** Facebook allows you to query the feed with a link like:
86
+
87
+ ```
88
+ https://facebook.com/me/feed?limit=25&offset=50
89
+ ```
90
+
66
91
### Keyset-based paging
67
92
68
93
```
@@ -71,6 +96,12 @@ Returns 10 records starting with record #11
71
96
72
97
Returns 10 records created AFTER ` OrderId ` with key 10123
73
98
99
+ ** Notable API:** Twitch provides this pagination with their clips but instead of taking a key, receives a timestamp
100
+
101
+ ```
102
+ GET https://api.twitch.tv/helix/clips?started_at=2021-08-01T09:10:00-00:00&first=100
103
+ ```
104
+
74
105
## Uploading files to an API
75
106
76
107
Instead of receiving an input parameter of type string or int, receive an input parameter of type ` IFormFile ` like this:
You can’t perform that action at this time.
0 commit comments