mirror of
https://github.com/kennethreitz/gistapi.py.git
synced 2026-06-05 23:10:17 +00:00
Cleaner readme example
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>GistAPI</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.python.pydev.PyDevBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.python.pydev.pythonNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?eclipse-pydev version="1.0"?>
|
||||
|
||||
<pydev_project>
|
||||
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
|
||||
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.6</pydev_property>
|
||||
<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
|
||||
<path>/GistAPI/gistapi</path>
|
||||
</pydev_pathproperty>
|
||||
</pydev_project>
|
||||
@@ -0,0 +1,3 @@
|
||||
#Wed Jun 23 13:47:22 EDT 2010
|
||||
eclipse.preferences.version=1
|
||||
encoding//gistapi/gistapi.py=utf-8
|
||||
+1
-1
@@ -10,7 +10,7 @@ Example Usage
|
||||
|
||||
::
|
||||
|
||||
from gistapi import *
|
||||
from gistapi import Gist, Gists
|
||||
|
||||
gist = Gist('d4507e882a07ac6f9f92')
|
||||
gist.description # 'Example Gist for gist.py'
|
||||
|
||||
+10
-8
@@ -8,28 +8,28 @@ GistAPI.py -- A Python wrapper for the Gist API
|
||||
Example usage:
|
||||
|
||||
>>> Gist('d4507e882a07ac6f9f92').repo
|
||||
u'd4507e882a07ac6f9f92'
|
||||
'd4507e882a07ac6f9f92'
|
||||
|
||||
>>> Gist('d4507e882a07ac6f9f92').owner
|
||||
u'kennethreitz'
|
||||
'kennethreitz'
|
||||
|
||||
>>> Gist('d4507e882a07ac6f9f92').description
|
||||
u'Example Gist for gist.py'
|
||||
'Example Gist for gist.py'
|
||||
|
||||
>>> Gist('d4507e882a07ac6f9f92').created_at
|
||||
u'2010/05/16 10:51:15 -0700'
|
||||
'2010/05/16 10:51:15 -0700'
|
||||
|
||||
>>> Gist('d4507e882a07ac6f9f92').public
|
||||
False
|
||||
|
||||
>>> Gist('d4507e882a07ac6f9f92').filenames
|
||||
[u'exampleEmptyFile', u'exampleFile']
|
||||
['exampleEmptyFile', 'exampleFile']
|
||||
|
||||
>>> Gist('d4507e882a07ac6f9f92').files
|
||||
{u'exampleFile': 'Example file content.', u'exampleEmptyFile': ''}
|
||||
{'exampleFile': 'Example file content.', uexampleEmptyFile': ''}
|
||||
|
||||
>>> Gists.fetch_by_user('kennethreitz')[-1].description
|
||||
u'My .bashrc configuration'
|
||||
'My .bashrc configuration'
|
||||
"""
|
||||
|
||||
|
||||
@@ -41,7 +41,6 @@ try:
|
||||
except ImportError:
|
||||
import json
|
||||
|
||||
|
||||
__all__ = ['Gist', 'Gists']
|
||||
|
||||
|
||||
@@ -126,4 +125,7 @@ class Gists(object):
|
||||
|
||||
if __name__ == '__main__':
|
||||
import doctest
|
||||
print('hello')
|
||||
a = 'bob'
|
||||
|
||||
doctest.testmod()
|
||||
|
||||
Reference in New Issue
Block a user