Skip to content

Feat: Implement accepted nfts endpoint#11

Merged
jaykayudo merged 1 commit intomainfrom
feature/accepted-nfts-endpoint
Apr 4, 2025
Merged

Feat: Implement accepted nfts endpoint#11
jaykayudo merged 1 commit intomainfrom
feature/accepted-nfts-endpoint

Conversation

@jaykayudo
Copy link
Contributor

Description

This PR introduces an API endpoint that retrieves a list of all accepted NFTs, including their contract address, name, and the total number of active listings associated with each NFT collection contract address. The implementation uses Django's ModelSerializer to serialize the AcceptedNFT model and efficiently aggregates the listing count using a custom method. The endpoint is optimized to minimize database load and is accompanied by unit tests to ensure the correctness of the functionality.

Related Issue

Fixes #8

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Performance improvement
  • Code refactoring
  • Documentation update
  • Test coverage improvement
  • CI/CD related changes

How Has This Been Tested?

  • Unit tests
  • Integration tests
  • Manual testing

Python Dependencies

# New dependencies:
factory-boy==3.3.0

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Security Considerations

  • This PR introduces no security concerns
  • This PR modifies authentication/authorization
  • This PR handles sensitive data
  • This PR modifies financial transaction logic

Performance Impact

  • This PR has no significant performance impact
  • This PR improves performance
  • This PR may impact performance negatively (explain why it's necessary)

Additional Context

@jaykayudo jaykayudo merged commit 45ef729 into main Apr 4, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BACKEND] Create API Endpoint to Retrieve All Accepted NFTs with Listing Count

1 participant