{"action":"created","issue":{"url":"https://api.github.com/repos/leMaik/RpgPlus/issues/6","labels_url":"https://api.github.com/repos/leMaik/RpgPlus/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/leMaik/RpgPlus/issues/6/comments","events_url":"https://api.github.com/repos/leMaik/RpgPlus/issues/6/events","html_url":"https://github.com/leMaik/RpgPlus/issues/6","id":110086004,"number":6,"title":"Persistence (key-value storage)","user":{"login":"leMaik","id":5544859,"avatar_url":"https://avatars.githubusercontent.com/u/5544859?v=3","gravatar_id":"","url":"https://api.github.com/users/leMaik","html_url":"https://github.com/leMaik","followers_url":"https://api.github.com/users/leMaik/followers","following_url":"https://api.github.com/users/leMaik/following{/other_user}","gists_url":"https://api.github.com/users/leMaik/gists{/gist_id}","starred_url":"https://api.github.com/users/leMaik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leMaik/subscriptions","organizations_url":"https://api.github.com/users/leMaik/orgs","repos_url":"https://api.github.com/users/leMaik/repos","events_url":"https://api.github.com/users/leMaik/events{/privacy}","received_events_url":"https://api.github.com/users/leMaik/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/leMaik/RpgPlus/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/leMaik/RpgPlus/labels/scripting","name":"scripting","color":"0052cc"}],"state":"open","locked":false,"assignee":{"login":"leMaik","id":5544859,"avatar_url":"https://avatars.githubusercontent.com/u/5544859?v=3","gravatar_id":"","url":"https://api.github.com/users/leMaik","html_url":"https://github.com/leMaik","followers_url":"https://api.github.com/users/leMaik/followers","following_url":"https://api.github.com/users/leMaik/following{/other_user}","gists_url":"https://api.github.com/users/leMaik/gists{/gist_id}","starred_url":"https://api.github.com/users/leMaik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leMaik/subscriptions","organizations_url":"https://api.github.com/users/leMaik/orgs","repos_url":"https://api.github.com/users/leMaik/repos","events_url":"https://api.github.com/users/leMaik/events{/privacy}","received_events_url":"https://api.github.com/users/leMaik/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/leMaik/RpgPlus/milestones/1","html_url":"https://github.com/leMaik/RpgPlus/milestones/MS1:%20Basic%20functionality%20and%20API","labels_url":"https://api.github.com/repos/leMaik/RpgPlus/milestones/1/labels","id":1341239,"number":1,"title":"MS1: Basic functionality and API","description":"Some basic functionality is done. Scripting a simple RPG should already be possible, but more complicated (and more awesome) features are still missing.\r\nDialogs, shopping and mob interaction is implemented.","creator":{"login":"leMaik","id":5544859,"avatar_url":"https://avatars.githubusercontent.com/u/5544859?v=3","gravatar_id":"","url":"https://api.github.com/users/leMaik","html_url":"https://github.com/leMaik","followers_url":"https://api.github.com/users/leMaik/followers","following_url":"https://api.github.com/users/leMaik/following{/other_user}","gists_url":"https://api.github.com/users/leMaik/gists{/gist_id}","starred_url":"https://api.github.com/users/leMaik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leMaik/subscriptions","organizations_url":"https://api.github.com/users/leMaik/orgs","repos_url":"https://api.github.com/users/leMaik/repos","events_url":"https://api.github.com/users/leMaik/events{/privacy}","received_events_url":"https://api.github.com/users/leMaik/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":3,"state":"open","created_at":"2015-10-06T19:57:34Z","updated_at":"2015-10-17T14:54:15Z","due_on":"2015-10-30T23:00:00Z","closed_at":null},"comments":1,"created_at":"2015-10-06T19:49:42Z","updated_at":"2015-10-21T19:48:41Z","closed_at":null,"body":"To allow using a database later (or saving directly into a file), the API should be asynchronous. For example:\r\n\r\n```lua\r\nstore = require \"rpgplus.storage\"\r\nstore.get(\"key\", \"default value\", function(value) end)\r\nstore.get(\"key\", function(valueOrNil) end)\r\n\r\nstore.put(\"key\", \"value\", function()\r\n  -- this callback is invoked when the value is saved\r\nend)\r\n```\r\n\r\nAlso, a per-player storage would be useful (either by playername that is converted to the UUID internally or by a player table).\r\n```lua\r\nstore.of(\"leMaik\").get(\"key\", \"foobar\", function(value)\r\n  -- gets the config option 'key' of leMaik\r\nend)\r\n```"},"comment":{"url":"https://api.github.com/repos/leMaik/RpgPlus/issues/comments/150006162","html_url":"https://github.com/leMaik/RpgPlus/issues/6#issuecomment-150006162","issue_url":"https://api.github.com/repos/leMaik/RpgPlus/issues/6","id":150006162,"user":{"login":"leMaik","id":5544859,"avatar_url":"https://avatars.githubusercontent.com/u/5544859?v=3","gravatar_id":"","url":"https://api.github.com/users/leMaik","html_url":"https://github.com/leMaik","followers_url":"https://api.github.com/users/leMaik/followers","following_url":"https://api.github.com/users/leMaik/following{/other_user}","gists_url":"https://api.github.com/users/leMaik/gists{/gist_id}","starred_url":"https://api.github.com/users/leMaik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leMaik/subscriptions","organizations_url":"https://api.github.com/users/leMaik/orgs","repos_url":"https://api.github.com/users/leMaik/repos","events_url":"https://api.github.com/users/leMaik/events{/privacy}","received_events_url":"https://api.github.com/users/leMaik/received_events","type":"User","site_admin":false},"created_at":"2015-10-21T19:48:41Z","updated_at":"2015-10-21T19:48:41Z","body":"It's in-memory and synchronous for now. It can be made asynchronous by using `rpgplus.async`. Adding a database-backend (sqlite?) would be useful later."}}