shopify/products/api_wrapper.py
def list(self, ids=(), limit=50, page=1, since_id=None, title=None,
             vendor=None, handle=None, product_type=None, collection_id=None,
             created_at_min=None, created_at_max=None, updated_at_min=None,
             updated_at_max=None, published_at_min=None, published_at_max=None,
             published_status='any', fields=()):
        """
        Return a list of products which are associated with your shopify account.

        :param ids: product ids to request.
        :param limit: Amount of results. (maximum: 250).
        :param page: Page to show.
        :param since_id: Restrict results to after the specified ID.
        :param title: Filter by product title.
        :param vendor: Filter by product vendor.
        :param handle: Filter by product handle.
        :param product_type: Filter by product type.
        :param collection_id: Filter by collection ID.
        :param created_at_min: Show products created after date.
        :param created_at_max: Show products create before date.
        :param updated_at_min: Show products last update after date.
        :param updated_at_max: Show products last updated before date.
        :param published_at_min: Show products published after date.
        :param published_at_max: Show products published before date.
        :param published_status: Filter by published status.
            Valid Values:
                published - Show only published products.
                unpublished - Show only unpublished products.
                any - Show all products.
        :param fields: List of fields to include in the response.
        :return:
        """
        url = self.url_host() + self.default_endpoint
        if published_status not in self.valid_published_status_values:
            raise ValueError('`published_status` must be one of {}'.format(self.valid_published_status_values))
        if limit > self.max_results_limit:
            raise ValueError('`limit` cannot exceed {}'.format(self.max_results_limit))
        params = dict(
            ids=','.join(ids),
            limit=limit,
            page=page,
            since_id=since_id,
            title=title,
            vendor=vendor,
            handle=handle,
            product_type=product_type,
            collection_id=collection_id,
            created_at_min=datetime_to_string(created_at_min),
            created_at_max=datetime_to_string(created_at_max),
            updated_at_min=datetime_to_string(updated_at_min),
            updated_at_max=datetime_to_string(updated_at_max),
            published_at_min=datetime_to_string(published_at_min),
            published_at_max=datetime_to_string(published_at_max),
            published_status=published_status,
            fields=','.join(fields)
        )
        params = self.remove_empty(params)
        response = requests.get(url, params=params)
        # with open('products-list.json', 'wb') as f:
        #     f.write(response.content)
        data = json.loads(response.content)
        return [Product(x) for x in data.get('products', [])]

        Return a list of products which are associated with your shopify account.

        :param ids: product ids to request.
        :param limit: Amount of results. (maximum: 250).
        :param page: Page to show.
        :param since_id: Restrict results to after the specified ID.
        :param title: Filter by product title.
        :param vendor: Filter by product vendor.
        :param handle: Filter by product handle.
        :param product_type: Filter by product type.
        :param collection_id: Filter by collection ID.
        :param created_at_min: Show products created after date.
        :param created_at_max: Show products create before date.
        :param updated_at_min: Show products last update after date.
        :param updated_at_max: Show products last updated before date.
        :param published_at_min: Show products published after date.
        :param published_at_max: Show products published before date.
        :param published_status: Filter by published status.
            Valid Values:
                published - Show only published products.
                unpublished - Show only unpublished products.
                any - Show all products.
        :param fields: List of fields to include in the response.
        :return:
        
Return a list of products which are associated with your shopify account.
Return a list of products which are associated with your shopify account .
def list(self, ids=(), limit=50, page=1, since_id=None, title=None,
             vendor=None, handle=None, product_type=None, collection_id=None,
             created_at_min=None, created_at_max=None, updated_at_min=None,
             updated_at_max=None, published_at_min=None, published_at_max=None,
             published_status='any', fields=()):
        url = self.url_host() + self.default_endpoint
        if published_status not in self.valid_published_status_values:
            raise ValueError('`published_status` must be one of {}'.format(self.valid_published_status_values))
        if limit > self.max_results_limit:
            raise ValueError('`limit` cannot exceed {}'.format(self.max_results_limit))
        params = dict(
            ids=','.join(ids),
            limit=limit,
            page=page,
            since_id=since_id,
            title=title,
            vendor=vendor,
            handle=handle,
            product_type=product_type,
            collection_id=collection_id,
            created_at_min=datetime_to_string(created_at_min),
            created_at_max=datetime_to_string(created_at_max),
            updated_at_min=datetime_to_string(updated_at_min),
            updated_at_max=datetime_to_string(updated_at_max),
            published_at_min=datetime_to_string(published_at_min),
            published_at_max=datetime_to_string(published_at_max),
            published_status=published_status,
            fields=','.join(fields)
        )
        params = self.remove_empty(params)
        response = requests.get(url, params=params)
        data = json.loads(response.content)
        return [Product(x) for x in data.get('products', [])]
def list ( self , ids = ( ) , limit = 50 , page = 1 , since_id = None , title = None , vendor = None , handle = None , product_type = None , collection_id = None , created_at_min = None , created_at_max = None , updated_at_min = None , updated_at_max = None , published_at_min = None , published_at_max = None , published_status = 'any' , fields = ( ) ) : url = self . url_host ( ) + self . default_endpoint if published_status not in self . valid_published_status_values : raise ValueError ( '`published_status` must be one of {}' . format ( self . valid_published_status_values ) ) if limit > self . max_results_limit : raise ValueError ( '`limit` cannot exceed {}' . format ( self . max_results_limit ) ) params = dict ( ids = ',' . join ( ids ) , limit = limit , page = page , since_id = since_id , title = title , vendor = vendor , handle = handle , product_type = product_type , collection_id = collection_id , created_at_min = datetime_to_string ( created_at_min ) , created_at_max = datetime_to_string ( created_at_max ) , updated_at_min = datetime_to_string ( updated_at_min ) , updated_at_max = datetime_to_string ( updated_at_max ) , published_at_min = datetime_to_string ( published_at_min ) , published_at_max = datetime_to_string ( published_at_max ) , published_status = published_status , fields = ',' . join ( fields ) ) params = self . remove_empty ( params ) response = requests . get ( url , params = params ) data = json . loads ( response . content ) return [ Product ( x ) for x in data . get ( 'products' , [ ] ) ]
Return a list of products which are associated with your shopify account.
Return a list of products which are associated with your shopify account .
"""
        Return a list of products which are associated with your shopify account.

        :param ids: product ids to request.
        :param limit: Amount of results. (maximum: 250).
        :param page: Page to show.
        :param since_id: Restrict results to after the specified ID.
        :param title: Filter by product title.
        :param vendor: Filter by product vendor.
        :param handle: Filter by product handle.
        :param product_type: Filter by product type.
        :param collection_id: Filter by collection ID.
        :param created_at_min: Show products created after date.
        :param created_at_max: Show products create before date.
        :param updated_at_min: Show products last update after date.
        :param updated_at_max: Show products last updated before date.
        :param published_at_min: Show products published after date.
        :param published_at_max: Show products published before date.
        :param published_status: Filter by published status.
            Valid Values:
                published - Show only published products.
                unpublished - Show only unpublished products.
                any - Show all products.
        :param fields: List of fields to include in the response.
        :return:
        """ # with open('products-list.json', 'wb') as f: #     f.write(response.content)
None
self
ids
product ids to request.
product ids to request .
limit
Amount of results.
Amount of results .
page
Page to show.
Page to show .
since_id
Restrict results to after the specified ID.
Restrict results to after the specified ID .
title
Filter by product title.
Filter by product title .
vendor
Filter by product vendor.
Filter by product vendor .
handle
Filter by product handle.
Filter by product handle .
product_type
Filter by product type.
Filter by product type .
collection_id
Filter by collection ID.
Filter by collection ID .
created_at_min
Show products created after date.
Show products created after date .
created_at_max
Show products create before date.
Show products create before date .
updated_at_min
Show products last update after date.
Show products last update after date .
updated_at_max
Show products last updated before date.
Show products last updated before date .
published_at_min
Show products published after date.
Show products published after date .
published_at_max
Show products published before date.
Show products published before date .
published_status
Filter by published status.
Valid Values:
published - Show only published products.
unpublished - Show only unpublished products.
any - Show all products.
Filter by published status . Valid Values : published - Show only published products . unpublished - Show only unpublished products . any - Show all products .
fields
List of fields to include in the response.
List of fields to include in the response .