Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Functionality to Fetch QR Hash Codes for a Specific Event #31

Open
rlajous opened this issue Jun 27, 2023 · 2 comments
Open

Add Functionality to Fetch QR Hash Codes for a Specific Event #31

rlajous opened this issue Jun 27, 2023 · 2 comments
Assignees
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@rlajous
Copy link
Member

rlajous commented Jun 27, 2023

Description

The POAP.js library currently offers various SDKs and utilities for interacting with the POAP ecosystem, including moments creation and management, TypeScript support, and easy integration with the ecosystem. To further enhance this library, we propose to add the functionality to fetch QR hash codes for a specific event using the POAP API endpoint /event/{id}/qr-codes.
This endpoint returns the list of qr_hash codes for a particular event, along with the claim status of each code for whether it has been claimed yet.

Proposed Feature

  • Create a new function, getEventQrCodes(eventId), that will hit the POST endpoint https://api.poap.tech/event/{id}/qr-codes, where {id} is the event's ID.
  • The function should return a list of qr_hash codes for the given event, along with the claim status of each code.

Why This Feature?

This feature would allow users of the library to easily fetch QR hash codes for specific events, which would be particularly useful for organizers and developers who need to manage or interact with these events.

Next Steps

  1. Fork the repository.
  2. Create a new branch with a descriptive name.
  3. Implement the feature and commit the changes with a clear and concise commit message.
  4. Create a pull request, describing the changes made and why.
@rlajous rlajous added good first issue Good for newcomers help wanted Extra attention is needed labels Jun 27, 2023
@therealharpaljadeja
Copy link

Is the function supposed to go here?

Are there any more details about /qr-codes route?

https://github.com/poap-xyz/poap.js/blob/main/packages/providers/src/core/PoapDropApi/PoapDropApi.ts

@rlajous
Copy link
Member Author

rlajous commented Oct 4, 2023

Is the function supposed to go here?

Are there any more details about /qr-codes route?

https://github.com/poap-xyz/poap.js/blob/main/packages/providers/src/core/PoapDropApi/PoapDropApi.ts

To integrate the endpoint into PoapDropApi.ts, you'd define a new function using an HTTP POST request to https://api.poap.tech/event/{id}/qr-codes. This function should send a Bearer token for authorization. When called, it should return a list of qr_hash codes for a specified event alongside the claim status of each code, take note that in the library, we call them mintCodes. You can follow the structure of existing functions in PoapDropApi.ts for guidance, adapting as necessary for the specifics of this​ endpoint​.

For working with Bearer tokens, you can refer to examples in PoapTokenApi.ts and apply the same principles in PoapDropApi.ts.

Do you want to be assigned to this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants