{"id":18021014,"url":"https://github.com/kevinjalbert/godville_kit","last_synced_at":"2025-03-26T22:30:33.173Z","repository":{"id":16722799,"uuid":"19479827","full_name":"kevinjalbert/godville_kit","owner":"kevinjalbert","description":"A gem kit to instantiate your hero's state from Godville","archived":false,"fork":false,"pushed_at":"2014-05-16T01:18:15.000Z","size":202,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-22T14:22:07.142Z","etag":null,"topics":["api","godville","rubygem"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"jinto/coding_training","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kevinjalbert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-06T03:29:49.000Z","updated_at":"2024-02-02T23:38:46.000Z","dependencies_parsed_at":"2022-07-19T06:02:02.014Z","dependency_job_id":null,"html_url":"https://github.com/kevinjalbert/godville_kit","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinjalbert%2Fgodville_kit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinjalbert%2Fgodville_kit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinjalbert%2Fgodville_kit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinjalbert%2Fgodville_kit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kevinjalbert","download_url":"https://codeload.github.com/kevinjalbert/godville_kit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245747387,"owners_count":20665780,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","godville","rubygem"],"created_at":"2024-10-30T06:08:31.587Z","updated_at":"2025-03-26T22:30:32.833Z","avatar_url":"https://github.com/kevinjalbert.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Godville Kit\n[![Gitter Chat](http://img.shields.io/badge/chat-gitter-brightgreen.svg)](https://gitter.im/kevinjalbert/godville_kit)\n[![Gem Version](https://badge.fury.io/rb/godville_kit.svg)](http://badge.fury.io/rb/godville_kit)\n[![Build Status](https://travis-ci.org/kevinjalbert/godville_kit.svg?branch=master)](https://travis-ci.org/kevinjalbert/godville_kit)\n[![Coverage Status](https://img.shields.io/coveralls/kevinjalbert/godville_kit.svg)](https://coveralls.io/r/kevinjalbert/godville_kit?branch=master)\n[![Code Climate](https://img.shields.io/codeclimate/github/kevinjalbert/godville_kit.svg)](https://codeclimate.com/github/kevinjalbert/godville_kit)\n[![Dependency Status](https://img.shields.io/gemnasium/kevinjalbert/godville_kit.svg)](https://gemnasium.com/kevinjalbert/godville_kit)\n\n## Introduction\n\nThis gem provides the functionality to query [Godville](http://godvillegame.com) for your hero's information. As [Godville](http://godvillegame.com) does not provide a public documented API, other approaches had to be explored. By observing the network activity when accessing [Godville' hero page](http://godvillegame.com/superhero), it be clear that there are HTTP API calls to acquire the hero's information.\n\nBy using these HTTP API calls it is possible to acquire a JSON response containing the hero's data. This Gem takes the JSON responses and transforms them into a cohesive object structure detailing the hero. Hopefully this provides an easier way for data collection/visualizations or whatever you wish to create.\n\n## Example Usage\nThe follow shows you how to perform the authentication with [Godville's](http://godvillegame.com) servers, which then allows you to fetch your hero's data.\n\n    require 'godville_kit\n\n    # Create an API requester, which performs authentication and HTTP requests\n    requester = GodvilleKit::APIRequester.new('user@gmail.com', 'my_password', 'hero_guid', 'pantheons_guid')\n\n    # Fetch the current state of your hero and provides it as an object structure\n    hero = requester.request_hero\n\n### Required Data\nThe `APIRequester` requires four pieces of information: username/email, password, hero GUID, pantheons GUID. The first two you should already know. To acquire the GUIDs are slightly more involved. From what I understand these Globally Unique Identifier (GUID) simply reference a resource as you make the API requests. These API requests are all going to the same API endpoint, and so we require the GUIDs to make requests for hero and pantheons data.\n\nThis is all speculation on how [Godville](http://godvillegame.com) servers handle identified the resources. I have noticed that the Pantheons GUID changes through sessions, although the old GUID still provide access, so I am unsure how it exactly works, or when it will expire.\n\n#### Hero GUID\n1. Open up Chrome (this work with Firefox as well, although some details will be different)\n2. Open the Developer Tools view\n3. Select the Network tab\n4. Open/Refresh [http://godvillegame.com/superhero](http://godvillegame.com/superhero)\n5. Look for an entry similar to `feed?a=hero_guid`\n\n#### Pantheons GUID\n1. Open up Chrome (this work with Firefox as well, although some details will be different)\n2. Open the Developer Tools view\n3. Select the Network tab\n4. Open/Refresh [http://godvillegame.com/superhero](http://godvillegame.com/superhero)\n5. You need to look through the multiple `feed` entries and identify the one where the Response tab shows pantheons data.\n6. Using the identified `feed` entry look at the Header tab's Form Data value `a=pantheons_guid`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevinjalbert%2Fgodville_kit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkevinjalbert%2Fgodville_kit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevinjalbert%2Fgodville_kit/lists"}