Skip to content

Unable to get ['meta']['pagination']['total_pages'] from products = api.Products.all()  #59

@sabotagebeats

Description

@sabotagebeats

Expected behavior

in requests library, total_pages returned in json.

Actual behavior

products = api.Products.all()
does not return all items, it returns only the first page of items.

products = api.Products.all(page=2)
produces second page but does not return total pages.

products = api.Products.all(limit=250)
produces 250 items, no total_pages

count = api.Products.count()
products = api.Products.all(limit=count)

fails with exception: bigcommerce.exception.ClientRequestException: 413 Request Entity Too Large @ products: [{"status":413,"message":"The specified limit exceeds the maximum allowed.","details":{"max_limit":250}}]

This makes it impossible to iterate pagination within the bigcommerce-api-python library.

Steps to reproduce behavior

api = bigcommerce.api.BigcommerceApi(client_id=clientID, store_hash=store_hash, access_token=accessToken)
count = api.Products.count()
products = api.Products.all(limit=count)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions