def setUp(self): # TODO: Don't use a live pin request between each test, store in cassete and make sure it # matches the one that comes back from the api in another test so we only make one request. self.api = pinpy.API(os.environ['PIN_TOKEN'], os.environ['PIN_V3_TOKEN']) self.board_pins = self.api.get_public_board_pins_v3( '554857685279866446', page_size=10)
def setUp(self): # TODO: Don't use a live pin request between each test, store in cassete and make sure it # matches the one that comes back from the api in another test so we only make one request. self.api = pinpy.API(os.environ['PIN_TOKEN'], os.environ['PIN_V3_TOKEN']) self.id = '695384136122132328' self.user = self.api.get_user_v3(self.id)
def setUp(self): # TODO: Don't use a live pin request between each test, store in cassete and make sure it # matches the one that comes back from the api in another test so we only make one request. self.api = pinpy.API(os.environ['PIN_TOKEN'], os.environ['PIN_V3_TOKEN']) self.following = self.api.get_user_following_v3('hawkins6654', page_size=10)
"""client script""" import pinpy import os from pprint import pprint api = pinpy.API(os.environ['PIN_TOKEN'], os.environ['PIN_V3_TOKEN']) # getting a pin using the experimental v3 of the api pin = api.get_public_pin_v3('521713938070463188') del pin._data['feedback_options'] pprint(pin.to_json()) # print API_CLIENT.create_board({'name': 'test3'}) # print API_CLIENT.create_pin({ # 'board': 'yvesfu/test3', # 'note': 'a new pin', # 'link': 'https://www.spartasales.com', # 'image_url': 'http://img.over-blog-kiwi.com/0/86/68/47/20140304/ob_9b442c_baby-115a.jpg' # })