Git Product home page Git Product logo

api's People

Contributors

ayaanqui avatar

Stargazers

 avatar

Watchers

 avatar

api's Issues

Fix parameters for `EventService.Patch` method

func (service *EventService) Patch(user *types.User, input *types.CreateEvent, event *types.Event) (bool, error) {

The Patch method currently requires the user of the method to fetch the proper event object. However, I think it would be much better to have the method take an id parameter and change the event parameter to output. This way we can use the id parameter to fetch the event and then the updated value can be "returned" using output.

func (service *EventService) Patch(id string, user *types.User, input *types.CreateEvent, output *types.Event) (bool, error)

Avoid creating draws server-side

The current way to generate draws is through making a POST request to /draws withe the event id as the body, and then calling /draws/confirm/:eventId. The problem with this approach, as noted in issue #3 is that the current algorithm is too slow and does not generate all possible combinations.

Instead, I propose that these draws be generated on the client side and sent to /draws/confirm/:eventId with a POST request with the body holding all draws. This will make for faster draw generation and also allow organizers to manually create pairings.

[POST] /events Email participants if provided

Emailing participants that have been added manually will help them find out that they've been added to an event. This feature will also be helpful when we implement the "clone event" feature in the future.

Add unit tests

As the title suggests, the repo is lacking of any testing. It's crucial to make sure that the API is functioning properly and the best way to check is through running unit tests.

Resources

Tasks

  • Add unit tests
  • Implement Github Actions to run unit tests

Search with Amazon PA API

// TODO: Find product by Amazon product key search

Search with Amazon PA API as the fallback if not results were found with queries to DB. Since requesting Amazon could potentially be slow compared to hitting the GiftTrade DB, this should only when the full-text query returns nothing. A few caveats are that Amazon PA API requires certain criteria to be met before this API can be used.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.