Skip to content

how to get the pledge status using field option in api_client.fetch_page_of_pledges()  #40

Description

@morgolock

Hi, I'm having trouble to get the optional fields from the pledges. I need to get status see https://docs.patreon.com/#pledge

  "type": "pledge"
  "id": <string>
  "attributes": {
    "amount_cents": <int> // Amount cents in the currency used by the patron
    "created_at": <date>
    "currency": <string> // Currency code of the pledge event (USD, GBP, EUR etc.)
    "declined_since": <date>
    "patron_pays_fees": <bool>
    "pledge_cap_cents": <int>
    // optional properties
    "total_historical_amount_cents": <int>
    "is_paused": <bool>
    "status": <string> // The status of this pledge (valid, declined, pending, disabled)
    "has_shipping_address": <bool>
  }
  "relationships": {
    "patron": ...<user>...
    "reward": ...<reward>... // Tier associated with this pledge
    "creator": ...<user>...
    "address": ...<address>...
  }
}

Is this supported in the python api? what I am supposed to pass into the function fetch_page_of_pledges to retrieve the status ? It seems to expect a dictionary? I tried many things but I cannot seem to get the pledge status

Would you please help and clarify what I should pass to the function below to get the pledge status?

       pledges_response = api_client.fetch_page_of_pledges(campaign.id(), 25, cursor=cursor,fields='status'})

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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