Repository navigation
Releases: stevezaluk/mtgjson-api
Releases · stevezaluk/mtgjson-api
Release list
v1.0.0
Changelog
- 12c3d76 Abstracted out an API object representing a Gin router to further isolate logic for the API
- df97393 Added Comments for AddRoutes and addSetRoutes
- ba5221d Added Go module and dependencies
- 3adedaa Added ValidateToken middleware to authenticated endpoints
- e3cc1c1 Added a basic constructor for the API struct
- 0d278fc Added a very vanilla config file that can be used in most deployments
- b7b0636 Added additional dependencies and updated the LICENSE for cobra
- 3980d66 Added additional errors for failing to find a deck
- efbd4f9 Added additional errors for no decks being found upon an index
- a02be07 Added additional errors to cover moving cards between boards that do not exist
- a98aa5c Added additional flags for passing auth0 information into the viper config
- 5aba53d Added additional scope reset:password
- f7745e6 Added additional validation for the api.no_scope flag. This can bypass scope validation
- 0164f09 Added an additional CLI flag for auth0.scope
- 9eac4c8 Added an additional check and response for invalid email address being returned from GET /user
- 6e8ab93 Added an additional check on DeckContentPOST to return an error when no cards are passed in the request body
- 0b84a43 Added an additional constructor for initializing the API from viper config values
- a2edaa2 Added an additional endpoint /deck/content to fetch the contents of a deck
- cdd070a Added an additional error check for when the api fails to start
- b76a5b8 Added an additional error response for when no cards are passed to the DeckContentDELETE route
- 74ea9ba Added an additional error to cover if MongoDB returns an error on a delete operation
- d6336eb Added an additional flag called api.no_scope that allows you to bypassed scoped permissions for all endpoints
- 1b84c98 Added cobra flags for all config values
- a31e7a8 Added comments
- 6b30004 Added comments for each of the functions in api.go
- 1607c33 Added dependencies for slog-gin
- 07db3d4 Added empty OneDev build spec
- 1359be8 Added go-version input on setup-go action
- 6b38d33 Added initConfig function for initializing viper and its associating values
- fa9a6fb Added missing quotes
- f2e76c8 Added missing return statement from conditional
- 2c7a546 Added scope validators to all protected endpoints
- f909913 Added some new errors that we are going to need for deck creation
- 47aa13a Added support for adding set endpoints to the namespaces slice
- 9715553 Added support for creating a new deck from a Deck model. Additionally, the ValidateCards function was implemented to ensure that all cards are present within the database
- ab703f5 Added the prefix /api/v1 to all endpoints
- dd6efa9 Attempting to post a deck with a code that already exists under a different deck now returns a conflict instead of a bad request
- e13fe8e Basic function for returning JSON whenever the /health endpoint is called
- 249f1fc Basic support for deleting a single item has been implemented
- 2256495 Boilerplate code for the CardGET function. This function is going to handle returning basic card metadata as requested from users
- 636f40a Boilerplate code for the Run command. This will be the primary entrypoint for our API and will allow you to pass configuration either through a JSON file or through environmental variables
- d0fcc14 Boilerplate for this written
- be86dcf Changed the order for how handlers are getting appended to the Handle function. The core logic handler for the endpoint was getting appended first, bypassing all authentication and authorization
- aa68504 Changed the semantics of the port flag
- 4d0d27b Combined the Card Atomic and Card Set types as this is going to represent all cards
- fb7a67e Comments for API functions
- d972ac9 Comments for Card API
- e4d7a3b Comments for Card API
- ef83d25 Comments for Deck API functions
- 9d91084 Comments, comments, comments
- c2839fe Converted all integer based status codes to use the const variables provided by the HTTP package
- e504ba8 Created additional errors for when updating a deck fails
- 7dde3f1 Decided to remove the PUT request register for the /deck/content endpoint and move it to a POST request. Planning on using PUT for moving cards in between boards
- f1628c0 Defined basic Dockerfile for starting the API
- 341cb28 Exported the ValidateUUID function to ensure that it can be used outside of the file
- a81aae8 Externalized UUID validation to a seperate function
- 8f5ad19 Externalized ValidateScope to a seperate file within the auth package
- 8e50ad3 Externalized all gin handler functions to the middleware package
- e73c604 Externalized errors and context to there own packages to ensure that we can avoid circular imports
- a03d252 Externalized logic for adding cards to the Deck model. Additionally, cards can now be added to any board and multiple can be passed in a single request
- a42b0ca Externalized logic for interacting with deck content to a seperate file
- 3d96bf5 Externalized logic for storing user email to a seperate gin handler
- 4cca28d Externalized logic for updating a MongoDB record from AddCard. This allows us to update the deck multiple times with new cards without having to replace the row each time we add a card
- 76363c4 Externalized logic for validating cards to the card_set file instead of the deck model. This ensures that we can validate the deck of cards before we add them to the model
- 6f9b1bb Externalized logic for validating scopes to a seperate function so that we can use this in the gin handlers of the endpoints
- f325110 Externalized sealed products to a seperate module
- 24094fa Externalized the logic for fetching a board to a seperate function. This ensures that the code remains re-usable
- 4aebef4 Externalized the model for recognizing deck updates to a seperate file
- 800540f Fixed logic issue that was splitting the expected scope instead of the scope stored in the custom claims
- 4a79a72 Fixed small typo in --debug help message
- 6b65826 Fixed small typos in the data types of the following fields: BorderColor, FrameVersion
- d67ca0f Fixed spelling errors in the comment for GetValidator
- af7a250 Full functionaltiy for fetching single deck through the /deck endpoint
- 5f52520 Full model for BoosterPacks and BoosterConfig
- a9669e4 Full model for Sealed Product contents
- 13f743e Full model for SealedProducts
- 390f9f1 Full model for Set
- c452f3e Full model for the BoosterSheet
- e4ed182 Further externalized the logic for fetching single cards. Two custom errors were also created: ErrInvalidUUID, and ErrNoCard
- da1ecb4 Go mod tidy
- c27658c Go mod tidy
- d9e0031 Impelemented full support for making delete requests to the /deck endpoint
- 1d19fd4 Implemented a CLI flags that allows the user to start the API without authentication enabled
- a7b9ae6 Implemented a GetDatabase function under the context package to ensure that we dont have to directly interact with the context variable
- 76eb689 Implemented a RegisterEndpoint function. This registers the endpoint with the request type and any gin handlers
- 0c1b91c Implemented a basic background context here. This stores the config and database str...