Пример #1
0
 def albums(self):
     data = {}
     username = None
     page = 1
     if self.params.has_key("username"):
         username = self.params["username"]
     if self.params.has_key("page"):
         page = self.params["page"]
     if username and page:
         pixnet = Pixnet()
         data = pixnet.get_album_sets(key=None,
                                      parameters={
                                          'user': username,
                                          'page': page
                                      })
     self.render(json=self.to_json(data))
Пример #2
0
 def albums(self):
     data={}
     username=None
     page=1
     if self.params.has_key( "username" ):
         username=self.params[ "username" ]
     if self.params.has_key( "page" ):
         page=self.params[ "page" ]
     if username and page:
         pixnet=Pixnet()
         data = pixnet.get_album_sets( 
                 key=None,
                 parameters={
                     'user': username,
                     'page': page 
                   }
                 )
     self.render(json=self.to_json(data))
Пример #3
0
 def photos(self):
     data = {}
     set_id = None
     username = None
     page = 1
     if self.params.has_key("id"):
         set_id = self.params["id"]
     if self.params.has_key("username"):
         username = self.params["username"]
     if self.params.has_key("page"):
         page = self.params["page"]
     if set_id and username and page:
         pixnet = Pixnet()
         data = pixnet.get_album_elements(key=None,
                                          parameters={
                                              'set_id': set_id,
                                              'user': username,
                                              'page': page
                                          })
     self.render(json=self.to_json(data))
Пример #4
0
 def photos(self):
     data={}
     set_id=None
     username=None
     page=1
     if self.params.has_key( "id" ):
         set_id=self.params[ "id" ]
     if self.params.has_key( "username" ):
         username=self.params[ "username" ]
     if self.params.has_key( "page" ):
         page=self.params[ "page" ]
     if set_id and username and page:
         pixnet=Pixnet()
         data = pixnet.get_album_elements(
                 key=None,
                 parameters={
                     'set_id': set_id,
                     'user': username,
                     'page': page
                 }
                 )
     self.render(json=self.to_json(data))
Пример #5
0
def main(arg):
    pixnet = Pixnet()
    print(pixnet.get_users("elleryq", {}))
    print(pixnet.get_album_sets(parameters={'user': '******'}))
Пример #6
0
def main( arg ):
    pixnet=Pixnet()
    print( pixnet.get_users( "elleryq", {} ) )
    print( pixnet.get_album_sets( parameters={'user': '******' }) )