Home | Trees | Indices | Help |
---|
|
1 #vim:set et sts=4 sw=4: 2 # 3 # Flies Python Client 4 # 5 # Copyright (c) 2010 Jian Ni <jni@redhat.com> 6 # Copyright (c) 2010 Red Hat, Inc. 7 # 8 # This library is free software; you can redistribute it and/or 9 # modify it under the terms of the GNU Lesser General Public 10 # License as published by the Free Software Foundation; either 11 # version 2 of the License, or (at your option) any later version. 12 # 13 # This library is distributed in the hope that it will be useful, 14 # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 # GNU Lesser General Public License for more details. 17 # 18 # You should have received a copy of the GNU Lesser General Public 19 # License along with this program; if not, write to the 20 # Free Software Foundation, Inc., 59 Temple Place, Suite 330, 21 # Boston, MA 02111-1307 USA 22 23 24 __all__ = ( 25 "Project","Iteration" 26 ) 27 28 import json 29 from jsonmodel import BaseModel34 35 @property58 6237 return self.json.get('href')38 39 @href.setter41 self.json['href'] = href42 43 @property45 return self.json.get('type')46 47 @type.setter49 self.json['type'] = type50 51 @property53 return self.json.get('rel')54 55 @rel.setter57 self.json['rel'] = rel8665 BaseModel.__init__(self, json) 66 self.__iterations = iterations 67 if not json: 68 self.json['id'] = id 69 self.json['name'] = name 70 self.json['description'] = desc71 72 @property74 links = [] 75 for cont in self.json.get('links'): 76 iter = Links(cont) 77 links.append(iter) 78 return links79 80 @links.setter82 self.json['links'] = links83
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Thu Sep 2 01:12:24 2010 | http://epydoc.sourceforge.net |