-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from rui2015/BeatmapsIO-New-API
Implement new BeatSaver API
- Loading branch information
Showing
41 changed files
with
361 additions
and
453 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Breaking Changes on v2.0.0 | ||
|
||
These are all the breaking changes on v2.0.0 | ||
|
||
## Method Changes | ||
|
||
```diff | ||
- api.getMapDetailsByKey('key').then(map => {}).catch(err => {}); | ||
+ api.getMapByID('id').then(map => {}).catch(err => {}); | ||
|
||
- api.getMapDetailsByHash('hash').then(map => {}).catch(err => {}); | ||
+ api.getMapByHash('hash').then(map => {}).catch(err => {}); | ||
|
||
- api.getMapsSortedByLatest(page?).then(searchResult => {}).catch(err => {}); | ||
+ api.getLatestMaps(automapper, before?).then(searchResult => {}).catch(err => {}); | ||
|
||
- api.getMapsSortedByHot(page?).then(searchResult => {}).catch(err => {}); | ||
- api.getMapsSortedByRating(page?).then(searchResult => {}).catch(err => {}); | ||
- api.getMapsSortedByDownloads(page?).then(searchResult => {}).catch(err => {}); | ||
- api.getMapsSortedByPlays(page?).then(searchResult => {}).catch(err => {}); | ||
|
||
- api.searchMap('string').then(searchResult => {}).catch(err => {}); | ||
+ api.searchMaps(searchOptions, page?).then(searchResult => {}).catch(err => {}); | ||
|
||
- api.downloadMapByKey('key', directory).then(fileLocation => {}).catch(err => {}); | ||
- api.downloadMapByHash('hash', directory).then(fileLocation => {}).catch(err => {}); | ||
``` | ||
|
||
## Downloading maps | ||
|
||
The methods for downloading maps have been removed. You now have to handle downloading the files yourself. | ||
To get the download URL for a map, you can use the following code: | ||
|
||
```js | ||
const requestedMap = await api.getMapByID('ID'); | ||
const downloadURL = requestedMap.versions[0].downloadURL; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.