You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The idea is to perform basic MDBList operations directly from your command line, regardless of what OS you use. This Golang project leverages it's [native API](https://api.mdblist.com/) - the API documentation is located here:[Apiary](https://mdblist.docs.apiary.io/).
15
+
The idea is to perform basic MDBList operations directly from your command line, regardless of what OS you use. This Golang project leverages it's [native API](https://api.mdblist.com/) - the API documentation is located on[Apiary](https://mdblist.docs.apiary.io/).
16
16
17
17
## Download
18
18
19
19
See the latest [release](https://github.com/luckylittle/mdblist-cli/releases/). We have single binary for MacOSX/ARM64, MacOSX/x86_64, FreeBSD, Linux/ARM, Linux/ARM64, Linux/x86_64, Windows x64.
20
20
21
21
## Usage
22
22
23
-
* Set up the API key environment variable in your Shell:
23
+
*:warning:Set up the API key environment variable in your Shell first :warning:
24
24
25
25
```bash
26
26
export MDBLIST_API_KEY=abcdefghijklmnopqrstuvwxy
27
27
```
28
28
29
-
* Help - No arguments
29
+
* No arguments - available commands
30
+
31
+
<details>
30
32
31
33
```bash
32
34
$ ./mdblist-cli
@@ -40,7 +42,7 @@ Available Commands:
40
42
get Get resources from MDBList
41
43
help Help about any command
42
44
search Search resources in MDBList
43
-
update Update resources on MDBList
45
+
update Update resources in MDBList
44
46
45
47
Flags:
46
48
-h, --help helpfor mdblist-cli
@@ -49,26 +51,30 @@ Flags:
49
51
Use "mdblist-cli [command] --help"for more information about a command.
50
52
```
51
53
54
+
</details>
55
+
52
56
* Help - Get
53
57
58
+
<details>
59
+
54
60
```bash
55
61
$ ./mdblist-cli get --help
56
-
Get resources from MDBList
62
+
Get resources from MDBList.
57
63
58
64
Usage:
59
65
mdblist-cli get [command]
60
66
61
67
Available Commands:
62
-
last-activities Fetch the last activity timestamps for sync
63
-
list Fetch a specific list by ID or by username and list name
64
-
list-changes Fetch changes fora list by its ID
65
-
list-items Fetch items from a list by ID or by username and list name
68
+
last-activities Fetch the last activity timestamps for sync.
69
+
list Retrieves details of a list.
70
+
list-changes Returns Trakt IDs foritems changed after the last list update.
71
+
list-items Fetches items from a specified list.
66
72
media-info Fetch information about a media item
67
-
my-limits Get information about your API limits
68
-
my-lists Fetch your lists
69
-
top-lists Fetch the top lists
70
-
user-lists Fetch a user's lists by ID or username
71
-
watchlist-items Fetch items from the user's watchlist
73
+
my-limits Show information about user limits.
74
+
my-lists Fetches users lists.
75
+
top-lists Outputs the top lists sorted by Trakt likes.
76
+
user-lists Fetch a user's lists.
77
+
watchlist-items Fetches watchlist items, they are sorted by date added.
72
78
73
79
Flags:
74
80
-h, --help help for get
@@ -79,18 +85,22 @@ Global Flags:
79
85
Use "mdblist-cli get [command] --help" for more information about a command.
80
86
```
81
87
88
+
</details>
89
+
82
90
* Help - Search
83
91
92
+
<details>
93
+
84
94
```bash
85
95
$ ./mdblist-cli search --help
86
-
Search resources in MDBList
96
+
Search resources in MDBList.
87
97
88
98
Usage:
89
99
mdblist-cli search [command]
90
100
91
101
Available Commands:
92
-
lists Search forpublic lists
93
-
media Search formedia
102
+
lists Search public lists by title.
103
+
media Search for movie, show or both (any).
94
104
95
105
Flags:
96
106
-h, --help help for search
@@ -101,17 +111,22 @@ Global Flags:
101
111
Use "mdblist-cli search [command] --help" for more information about a command.
102
112
```
103
113
114
+
</details>
115
+
104
116
* Help - Update
105
117
118
+
<details>
119
+
106
120
```bash
107
121
$ ./mdblist-cli update --help
108
-
Update resources on MDBList
122
+
Update resources in MDBList.
109
123
110
124
Usage:
111
125
mdblist-cli update [command]
112
126
113
127
Available Commands:
114
-
list-name Update a list's name by ID or by username and list name
128
+
list-items You can modify static list by adding or removing items.
129
+
list-name Updates the name of a list.
115
130
116
131
Flags:
117
132
-h, --help help for update
@@ -122,10 +137,14 @@ Global Flags:
122
137
Use "mdblist-cli update [command] --help" for more information about a command.
123
138
```
124
139
140
+
</details>
141
+
125
142
## Examples
126
143
127
144
* `mdblist-cli get my-limits` - Get information about the API key's limits
128
145
146
+
<details>
147
+
129
148
```json
130
149
{
131
150
"api_requests": 1000,
@@ -136,8 +155,12 @@ Use "mdblist-cli update [command] --help" for more information about a command.
136
155
}
137
156
```
138
157
158
+
</details>
159
+
139
160
*`mdblist-cli get top-lists` - Top lists **JSON** (omitted)
140
161
162
+
<details>
163
+
141
164
```json
142
165
[
143
166
{
@@ -155,7 +178,11 @@ Use "mdblist-cli update [command] --help" for more information about a command.
155
178
...
156
179
```
157
180
158
-
*`mdblist-cli get top-lists --output=yaml` - Same as above, Top lists **YAML** (omitted)
181
+
</details>
182
+
183
+
*`mdblist-cli get top-lists --output=yaml` - Top lists again, but **YAML** (omitted)
184
+
185
+
<details>
159
186
160
187
```yaml
161
188
- id: 2194
@@ -172,8 +199,12 @@ Use "mdblist-cli update [command] --help" for more information about a command.
172
199
...
173
200
```
174
201
202
+
</details>
203
+
175
204
*`mdblist-cli get list --id 2194` - Specific list details
176
205
206
+
<details>
207
+
177
208
```json
178
209
[
179
210
{
@@ -191,8 +222,12 @@ Use "mdblist-cli update [command] --help" for more information about a command.
191
222
]
192
223
```
193
224
225
+
</details>
226
+
194
227
*`mdblist-cli get list-items --username garycrawfordgc --listname "latest-tv-shows"` - Get items from the list (omitted)
195
228
229
+
<details>
230
+
196
231
```json
197
232
{
198
233
"movies": [],
@@ -212,7 +247,11 @@ Use "mdblist-cli update [command] --help" for more information about a command.
212
247
...
213
248
```
214
249
215
-
*`mdblist-cli get media-info imdb show tt32159809 --output=yaml` - Get details about the media
250
+
</details>
251
+
252
+
*`mdblist-cli get media-info imdb show tt32159809 --output=yaml` - Get details about the media, **YAML** (omitted)
253
+
254
+
<details>
216
255
217
256
```yaml
218
257
title: The Paper
@@ -239,7 +278,11 @@ ratings:
239
278
...
240
279
```
241
280
242
-
* `mdblist-cli search media any -q "The Paper"` - Search query
281
+
</details>
282
+
283
+
* `mdblist-cli search media any -q "The Paper"` - Search query, first 100 items (omitted)
284
+
285
+
<details>
243
286
244
287
```json
245
288
...
@@ -258,10 +301,61 @@ ratings:
258
301
}
259
302
}
260
303
],
261
-
"total": 40
304
+
"total": 100
262
305
}
263
306
```
264
307
308
+
</details>
309
+
310
+
* `mdblist-cli update list-items -a add -i 113124 --movie-imdb tt26581740` - Add item to the static list
311
+
312
+
<details>
313
+
314
+
`List items updated successfully (action: add).`
315
+
316
+
```json
317
+
{
318
+
"added": {
319
+
"episodes": 0,
320
+
"movies": 1,
321
+
"seasons": 0,
322
+
"shows": 0
323
+
},
324
+
"existing": {
325
+
"episodes": 0,
326
+
"movies": 0,
327
+
"seasons": 0,
328
+
"shows": 0
329
+
},
330
+
"not_found": {
331
+
"episodes": 0,
332
+
"movies": 0,
333
+
"seasons": 0,
334
+
"shows": 0
335
+
}
336
+
}
337
+
```
338
+
339
+
</details>
340
+
341
+
* `mdblist-cli update list-items -a remove -i 113124 --movie-imdb tt26581740 --output yaml` - Remove item from the static list, **YAML**
0 commit comments