Skip to content
/ SMMBAPI Public

API like script for Super Mario Maker Bookmark

Notifications You must be signed in to change notification settings

rikels/SMMBAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SMMBAPI

Hosted API

I use OpenShift (By RedHat) and Flask (Python library) to create a hosted version for you to use without Python.
/api/course/ [GET]
Example: http://smmbapi-rikels.rhcloud.com/api/course/A917-0000-00E3-0C15
Returns: A JSON list with all the extracted information of the given course.

/api/course/recommended [GET]
Example: http://smmbapi-rikels.rhcloud.com/api/course/recommended
Returns: A JSON list with 10 random Super Mario Maker courses.

/api/course/ranked [GET] (Optional parameters: type,pagenum)
Valid types:total_liked_count,weekly_liked_count,like_rate
Valid pagenums:1-10
Example: http://smmbapi-rikels.rhcloud.com/api/course/ranked?pagenum=2&type=total_liked_count
Returns: A JSON list with 10 most liked courses from that page (page 1 is 1-10, page 2 is 11-20).

/api/maker/ranked [GET] (Optional parameters: type,pagenum)
Valid types:total_liked_count,weekly_liked_count
Valid pagenums:1-5
Example: http://smmbapi-rikels.rhcloud.com/api/maker/ranked?pagenum=2&type=total_liked_count
Returns: A JSON list with 10 most liked makers from that page (page 1 is 1-10, page 2 is 11-20).

The result will always be JSON. It's a good practice to always check the statuscode 200 is good, the rest is not ;)

Python API

This python script scrapes the info from courses via https://supermariomakerbookmark.nintendo.net it looks them up by ID.

How to use

Open a terminal and go to the directory you placed the script in. Open up Python and import smmbapi.
In Python just run a command like this smmbapi.GetCourseByID(ID)
Example: smmbapi.GetCourseByID("A917-0000-00E3-0C15")
This will return a dictionary with all the information retrieved from the site.
If the given ID isn't correct, the script will only return 404 (Not found).
Example: smmbapi.GetRecommendedCourses()
This will return a list of 10 random courses Example: smmbapi.GetRankedCourses(PageNum=1,Type="like_rate")
This will return the first page from the ranked courses based on their like rate.
Valid Types:total_liked_count,weekly_liked_count,like_rate
Valid PageNums:1-10
Example: smmbapi.GetRankedMakers(PageNum=2,Type="weekly_liked_count")
Valid Types:total_liked_count,weekly_liked_count
Valid PageNums:1-5

Here's a simple tree structure from GetCourseByID:
``` Results ├── ID (String) ├── Header │ ├── HeaderColor (String) │ │ returned by Nintendo, mostly returned: "blue","pink","green" │ ├── Rank (Int) │ │ It's mostly not used, only when you request the Ranked page │ ├── Difficulty(String) │ │ Returned by Nintendo, depends on your country... │ │ english: "Super Expert","Expert","Normal","Easy" │ │ Dutch: "Supermoeilijk","Moeilijk","Normaal","Makkelijk" │ ├── ClearRate(string, could make it a float...) │ │ ├── Body (main info of the course) │ │ │ │ │ ├── CourseTitle (String) │ ├── CourseImage (String,url) │ ├── CourseStyle (String) │ │ returns "SMB1", "SMB3", "SMW", "NSMBU" │ ├── CreatedAt (String) │ ├── CourseTag (String) │ ├── Likes (Int) │ ├── Plays (Int) │ ├── Shared (Int) │ ├── Tries (String) │ ├── CourseFullImage (String, url) │ ├── MakerMiiImage (String, url) │ ├── MakerCountry (String, 2 letters) │ │ Like: NL,DE,US │ ├── MakerMedals (int) │ ├── MakerName (String) │ │ ├── Records (Can also return empty, when none returned) │ │ │ │ │ ├── RecordMiiImage (String,url) │ ├── RecordCountry (String, 2 letters) │ ├── RecordName (String) │ ├── RecordTime (String) │ ├── FirstMiiImage (String, url) │ ├── FirstCountry (String, 2 letters) │ ├── FirstName (String) │ │ ├── RecentPlayers (list with more dictionaries, as much as people returned) │ │ │ │ │ ├── UserName (String) │ ├── UserCountry (String, 2 letters) │ ├── UserMii (String, url) │ │ ├── ClearedBy(list with more dictionaries, as much as people returned) │ │ │ │ │ ├── UserName (String) │ ├── UserCountry (String) │ ├── UserMii (String, url) │ │ ├── LikedBy(list with more dictionaries, as much as people returned) │ │ │ │ │ ├── UserName (String) │ ├── UserCountry (String) │ ├── UserMii (String, url) │ │ ├── Status │ │ │ │ │ ├── StatusCode (Int,200,400 or 404) │ ├── StatusExplantaion (String, tried to give the most accurate information) ``` Tree structure of GetRecommendedCourses ``` Results │ │ ├── Status │ │ │ │ │ ├── StatusCode (Int,200,400 or 404) │ ├── StatusExplantaion (String, tried to give the most accurate information) │ │ ├── RecommendedCourses (list of courses) │ ├── ID (string) ├── ├──Header │ ├── ├── HeaderColor (String) │ ├── │ returned by Nintendo, mostly returned: "blue","pink","green" │ ├── ├── Rank (Int) │ ├── │ It's mostly not used, only when you request the Ranked page │ ├── ├── Difficulty(String) │ ├── │ Returned by Nintendo, depends on your country... │ ├── │ english: "Super Expert","Expert","Normal","Easy" │ ├── │ Dutch: "Supermoeilijk","Moeilijk","Normaal","Makkelijk" │ ├── ├── ClearRate(string, could make it a float...) │ │ ├── ├── Body (main info of the course) │ ├── │ │ ├── │ │ ├── ├── CourseTitle (String) │ ├── ├── CourseImage (String,url) │ ├── ├── CourseStyle (String) │ ├── │ returns "SMB1", "SMB3", "SMW", "NSMBU" │ ├── ├── CreatedAt (String) │ ├── ├── CourseTag (String) │ ├── ├── Likes (Int) │ ├── ├── Plays (Int) │ ├── ├── Shared (Int) │ ├── ├── Tries (String) │ ├── ├── CourseFullImage (String, url) │ ├── ├── MakerMiiImage (String, url) │ ├── ├── MakerCountry (String, 2 letters) │ ├── │ Like: NL,DE,US │ ├── ├── MakerMedals (int) │ ├── ├── MakerName (String) ``` Tree structure of GetRankedCourses: ``` Results │ │ ├── Status │ │ │ │ │ ├── StatusCode (Int,200,400 or 404) │ ├── StatusExplantaion (String, tried to give the most accurate information) │ │ ├── RankedMakers (list of courses) ├── ├──Header │ ├── ├── HeaderColor (String) │ ├── │ returned by Nintendo, mostly returned: "blue","pink","green" │ ├── ├── Rank (Int) │ ├── │ The rank the level is at (at the moment) │ │ │ ├── MakerMiiImage (String, url) │ ├── MakerCountry (String, 2 letters) │ │ Like: NL,DE,US │ ├── MakerLikes (int) │ ├── MakerMedals (int) │ ├── MakerName (String) ``` Tree structure of GetRankedMakers ``` Results │ │ ├── Status │ │ │ │ │ ├── StatusCode (Int,200,400 or 404) │ ├── StatusExplantaion (String, tried to give the most accurate information) │ │ ├── RecommendedCourses (list of courses) │ ├── ID (string) ├── ├──Header │ ├── ├── HeaderColor (String) │ ├── │ returned by Nintendo, mostly returned: "blue","pink","green" │ ├── ├── Rank (Int) │ ├── │ The rank the level is at (at the moment) │ ├── ├── Difficulty(String) │ ├── │ Returned by Nintendo, depends on your country... │ ├── │ english: "Super Expert","Expert","Normal","Easy" │ ├── │ Dutch: "Supermoeilijk","Moeilijk","Normaal","Makkelijk" │ ├── ├── ClearRate(string, could make it a float...) │ │ ├── ├── Body (main info of the course) │ ├── │ │ ├── │ │ ├── ├── CourseTitle (String) │ ├── ├── CourseImage (String,url) │ ├── ├── CourseStyle (String) │ ├── │ returns "SMB1", "SMB3", "SMW", "NSMBU" │ ├── ├── CreatedAt (String) │ ├── ├── CourseTag (String) │ ├── ├── Likes (Int) │ ├── ├── Plays (Int) │ ├── ├── Shared (Int) │ ├── ├── Tries (String) │ ├── ├── CourseFullImage (String, url) │ ├── ├── MakerMiiImage (String, url) │ ├── ├── MakerCountry (String, 2 letters) │ ├── │ Like: NL,DE,US │ ├── ├── MakerMedals (int) │ ├── ├── MakerName (String) ```

About

API like script for Super Mario Maker Bookmark

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages