mirror of
https://github.com/kennethreitz/gistapi.py.git
synced 2026-06-05 23:10:17 +00:00
metadata refactoring
This commit is contained in:
@@ -1,6 +1,12 @@
|
||||
History
|
||||
=======
|
||||
|
||||
0.1.2 (2010-05-16)
|
||||
------------------
|
||||
* URL Generation BugFix
|
||||
* Updated versioning
|
||||
* Metadata refactoring
|
||||
|
||||
0.1.1 (2010-05-16)
|
||||
------------------
|
||||
|
||||
|
||||
+5
-1
@@ -1,3 +1,7 @@
|
||||
# encoding: utf-8
|
||||
|
||||
from gistapi import *
|
||||
from gistapi import *
|
||||
|
||||
__author__ = 'Kenneth Reitz'
|
||||
__version__ = '.'.join(('0', '1', '2'))
|
||||
__license__ = 'MIT'
|
||||
|
||||
+3
-8
@@ -34,11 +34,6 @@ import urllib
|
||||
try: import simplejson as json
|
||||
except ImportError: import json
|
||||
|
||||
__author__ = 'Kenneth Reitz'
|
||||
__version__ = ('0', '1', '1')
|
||||
__license__ = 'MIT'
|
||||
|
||||
|
||||
class Gist(object):
|
||||
"""Gist Object"""
|
||||
|
||||
@@ -71,9 +66,9 @@ class Gist(object):
|
||||
_meta_url = 'http://gist.github.com/api/v1/json/{0}'.format(self.id)
|
||||
_meta = json.load(urllib.urlopen(_meta_url))['gists'][0]
|
||||
|
||||
self.url = 'http://github.com/{0}'.format(id)
|
||||
self.embed_url = 'http://github.com/{0}.js'.format(id)
|
||||
self.json_url = 'http://github.com/{0}.json'.format(id)
|
||||
self.url = 'http://github.com/{0}'.format(self.id)
|
||||
self.embed_url = 'http://github.com/{0}.js'.format(self.id)
|
||||
self.json_url = 'http://github.com/{0}.json'.format(self.id)
|
||||
|
||||
for key, value in _meta.iteritems():
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
import os
|
||||
import sys
|
||||
import gistapi
|
||||
|
||||
|
||||
from distutils.core import setup
|
||||
|
||||
@@ -15,7 +17,7 @@ if sys.argv[-1] == "publish":
|
||||
sys.exit()
|
||||
|
||||
setup(name='gistapi',
|
||||
version='0.1.1',
|
||||
version=gistapi.__version__,
|
||||
description='Python wrapper for Gist API',
|
||||
long_description=open('README.rst').read() + '\n\n' + open('HISTORY.rst').read(),
|
||||
author='Kenneth Reitz',
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
from gistapi import *
|
||||
|
||||
for gist in Gists.fetch_by_user('defunkt'):
|
||||
if gist.description == 'A list of Gist clients.':
|
||||
print gist.id
|
||||
print gist.repo
|
||||
print gist.embed_url
|
||||
@@ -0,0 +1,7 @@
|
||||
from gistapi import *
|
||||
|
||||
for gist in Gists.fetch_by_user('defunkt'):
|
||||
if gist.description == 'A list of Gist clients.':
|
||||
print gist.id
|
||||
print gist.repo
|
||||
print gist.embed_url
|
||||
Reference in New Issue
Block a user