[API v2] Retrieving current user's pledges in 1 call

I’m using patreon-python to do api calls. I can’t figure out what fields I would need to request to get the current user’s pledge (or tier) they’re currently entitled to and their user id in 1 api call.

When a new user connects their patreon account on my website, I want to check if they’re a member of one of my campaign’s tiers so they can get benefits.

Problem is, I can only seem to get the user’s membership ids, which would mean I need to do an extra api call for each membership id to see what it is.

What I’d like is to get what tier id their membership is for. That way I have both their tier id AND their user id, which gives me all the puzzle pieces in 1 api call to do what I need.

Here’s my current code:

# this builds the url and sends a request using the patreon-python api
    user_response = api_client.get_identity(includes=['memberships', 'campaign'], fields={'member': [
        'currently_entitled_amount_cents',
        'patron_status',
    ]})

edit: just to make it clear, I don’t need the correct python code, I’m just looking for the url you would hit to get the data I need.

It returns a lot, but most importantly, it returns these includes:

    [ 
       { 
          'attributes':{ 
             'currently_entitled_amount_cents':0,
             'patron_status':'declined_patron'
          },
          'id':'63cd15ca-239f-4294-1234-4cac9df74a34',
          'type':'member'
       },
       { 
          'attributes':{ 
             'currently_entitled_amount_cents':0,
             'patron_status':'declined_patron'
          },
          'id':'05b66a76-5b40-4007-1234-4f516872bf6a',
          'type':'member'
       }
    ]

There’s my attempt. It returns all of the current user’s memberships, but the data isn’t great, and based on the api docs, I can’t figure out how I could get what I need. I could take those member ids and do a call for each of them and get what I need, but obviously I think there has to be a much better way.

tldr; I need the current user’s id and the tier ids that they’re pledged to in 1 api call. Figuring out if they’re an active paying patron would be cool too.