Hi! I have been working on a simple video game search and collection app in Salesforce to try and familiarize myself with development on the Force.com platform. I created a simple Visualforce page that uses the GiantBomb database, and allows you to store the information in a custom object. I have been using it to track games that I am interested in, own, and if I have completed them. I wanted to share the page here if anyone is interested.
Here are the primary features of the page:
- Search for games
- Save games to either a “Wishlist” or “Collection”
- These are two Record Types for a custom object with different Page Layouts
- Convert existing saved games from “Wishlist” to “Collection”
- View records in Salesforce
If you are interested in trying it out, you can either grab the code for the page and controller on my github: https://github.com/scurryah/svga or download this unmanaged package to install in in a dev org (password=”sforce”): https://login.salesforce.com/packaging/installPackage.apexp?p0=04t6g000008BuOh&isdtp=p1
The package includes a custom object, the page, the controller, and some images. All of the JS is referenced straight on the VF page for simplicity.
For either method, you will need to get your own API key and load it as a text static resource with the name GB_API_KEY.
I also limited the number of platforms that are returned for a game to be the most major platforms. You can adjust the number returned by adding platform names to the “state” object.
Here are the resources that I used to make the page:
- This is the API used to populate the results.
- A lot of the code is based off of the project work here, then adjust to leverage APEX instead of calling the API from JS. I liked the instructor and the content of the class as well.
- I took the search page and results layout straight from here. This was really good in teaching me how to quickly get started with SLDS.