Imgur / imgurpython

Official Imgur python client library (deprecated)
MIT License
546 stars 116 forks source link

Documentation with examples #16

Closed jasdev closed 9 years ago

ueg1990 commented 10 years ago

Hello I am interested in contributing to imgurpython....was wondering if I can contribute? Since there are not many issues and I do not know the API properly (used it only once a few months ago), maybe I can contribute to the documentation? If yes, what kind of documentation are you referring to? Adding it to the README or a separate documentation?

jasdev commented 10 years ago

Of course, we'd love contributors!

For documentation, we were thinking along the lines of examples for some of the commonly used functions like gallery(...) and upload_from_path(...). Adding it to the main README under an examples section would be perfect!

ueg1990 commented 10 years ago

Cool....i will start playing around with the API...but I will start properly next week. Is it ok I first start with examples for those API call where no actions on behalf of a user are required?

Btw, I am a big fan of Imgur and it is one of the my top 5 companies where I would love to work. Already started a new job this week, but I hope to apply to Imgur in the near future :)

jasdev commented 10 years ago

No worries! Anon API requests are perfectly fine :)

And whenever you're ready, shoot your resume/favorite project to jasdev@imgur.com and we can go from there!

ueg1990 commented 10 years ago

Hey, I just started playing with the API for the documentation. I needed some help on how to show the examples. Currently, I am using the following example:

from imgurpython import ImgurClient

client_id = 'YOUR CLIENT ID' client_secret = 'YOUR CLIENT SECRET'

client = ImgurClient(client_id, client_secret)

Example request

items = client.gallery() for item in items: print(item)

If i try to print each item from the gallery, it could be either an image (GalleryImage) and an album (GalleryAlbum). And when i print the type of item, i get a type 'instance'. How should I print the output for the example? I can either print all the values depending on the Data Models defined in the Imgur API documentation or any suggestion from you?

jasdev commented 10 years ago

I would stick towards printing attributes that developers would find useful in most scenarios, such as the permalink.

ueg1990 commented 10 years ago

so i just print specific data from the data models? as in: print item.link and give the output in the examples?

jasdev commented 10 years ago

Sounds good to me!