Skip to content
This repository was archived by the owner on Oct 4, 2023. It is now read-only.

Commit 18a8650

Browse files
committed
Deprecating command-line app
1 parent 719470f commit 18a8650

16 files changed

Lines changed: 9 additions & 639 deletions

File tree

README.md

Lines changed: 2 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ imgurpython
22
===========
33

44
A Python client for the [Imgur API](http://api.imgur.com/). Also includes a friendly demo application. It can be used to
5-
interact with the Imgur API and examine its responses, as a command line utility, and it can be used as a library
6-
within your projects.
5+
interact with the Imgur API in your projects.
76

87
You must [register](http://api.imgur.com/oauth2/addclient) your client with the Imgur API, and provide the Client-ID to
98
make *any* request to the API (see the [Authentication](https://api.imgur.com/#authentication) note). If you want to
@@ -200,87 +199,4 @@ except ImgurClientError as e
200199

201200
### Memegen
202201

203-
* `default_memes()`
204-
205-
Command Line Demo (deprecated)
206-
------------
207-
208-
Configuration
209-
-------------
210-
211-
Configuration is done through the **config.json** (placed in `imgur-python/data`) file in JSON format. The contents of the file should be a JSON
212-
object with the following properties:
213-
214-
### client_id
215-
216-
**Key**: 'client_id'
217-
218-
**Type**: string [16 characters]
219-
220-
**Description**: The Client-ID you got when you registered. Required for any API call.
221-
222-
### secret
223-
224-
**Key**: 'secret'
225-
226-
**Type**: string [40 characters]
227-
228-
**Description**: The client secret you got when you registered, needed fo OAuth2 authentication.
229-
230-
### token_store
231-
232-
**Key**: 'token_store'
233-
234-
**Type**: object
235-
236-
**Description**: Future configuration to control where the tokens are stored for persistent **insecure** storage of refresh tokens.
237-
238-
Command Line Usage
239-
------------------
240-
241-
> Usage: python main.py (action) [options...]
242-
>
243-
> ### OAuth Actions
244-
>
245-
> **credits**
246-
> View the rate limit information for this client
247-
>
248-
> **authorize**
249-
> Start the authorization process
250-
>
251-
> **authorize [pin]**
252-
> Get an access token after starting authorization
253-
>
254-
> **refresh [refresh-token]**
255-
> Return a new OAuth access token after it's expired
256-
>
257-
> ### Unauthorized Actions
258-
>
259-
> **upload [file]**
260-
> Anonymously upload a file
261-
>
262-
> **list-comments [hash]**
263-
> Get the comments (raw JSON) for a gallery post
264-
>
265-
> **get-album [id]**
266-
> Get information (raw JSON) about an album
267-
>
268-
> **get-comment [id]**
269-
> Get a particular comment (raw JSON) for a gallery comment
270-
>
271-
> **get-gallery [hash]**
272-
> Get information (raw JSON) about a gallery post
273-
>
274-
> ### Authorized Actions
275-
>
276-
> **upload-auth [access-token] [file]**
277-
> Upload a file to your account
278-
>
279-
> **comment [access-token] [hash] [text]**
280-
> Comment on a gallery post
281-
>
282-
> **vote-gallery [token] [hash] [direction]**
283-
> Vote on a gallery post. Direction can be either 'up', 'down', or 'veto'
284-
>
285-
> **vote-comment [token] [id] [direction]**
286-
> Vote on a gallery comment. Direction can be either 'up', 'down', or 'veto'
202+
* `default_memes()`

imgurpython/data/config.json.sample

Lines changed: 0 additions & 5 deletions
This file was deleted.

imgurpython/data/res/corgi.jpg

-95.6 KB
Binary file not shown.

imgurpython/data/res/error.jpg

Lines changed: 0 additions & 1 deletion
This file was deleted.

imgurpython/helpers/format.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,9 @@
1-
import math
21
from ..helpers import Comment
32
from ..helpers import GalleryAlbum
43
from ..helpers import GalleryImage
54
from ..helpers import Notification
65

76

8-
def center_pad(s, length):
9-
num_dashes = float(length - len(s) - 2) / 2
10-
num_dashes_left = int(math.floor(num_dashes))
11-
num_dashes_right = int(math.ceil(num_dashes))
12-
13-
return ('=' * num_dashes_left) + ' ' + s + ' ' + ('=' * num_dashes_right)
14-
15-
16-
def two_column_with_period(left, right, length):
17-
num_periods = int(length - (len(left) + len(right) + 2))
18-
return left + ' ' + ('.' * num_periods) + ' ' + right
19-
20-
217
def build_comment_tree(children):
228
children_objects = []
239
for child in children:

imgurpython/imgur/auth/__init__.py

Whitespace-only changes.

imgurpython/imgur/auth/accesstoken.py

Lines changed: 0 additions & 23 deletions
This file was deleted.

imgurpython/imgur/auth/anonymous.py

Lines changed: 0 additions & 18 deletions
This file was deleted.

imgurpython/imgur/auth/base.py

Lines changed: 0 additions & 14 deletions
This file was deleted.

imgurpython/imgur/auth/expired.py

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)