{"action":"created","issue":{"url":"https://api.github.com/repos/malle-pietje/UniFi-API-browser/issues/10","repository_url":"https://api.github.com/repos/malle-pietje/UniFi-API-browser","labels_url":"https://api.github.com/repos/malle-pietje/UniFi-API-browser/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/malle-pietje/UniFi-API-browser/issues/10/comments","events_url":"https://api.github.com/repos/malle-pietje/UniFi-API-browser/issues/10/events","html_url":"https://github.com/malle-pietje/UniFi-API-browser/issues/10","id":172740124,"number":10,"title":"Create vouchers","user":{"login":"tirannilakshe","id":10926138,"avatar_url":"https://avatars.githubusercontent.com/u/10926138?v=3","gravatar_id":"","url":"https://api.github.com/users/tirannilakshe","html_url":"https://github.com/tirannilakshe","followers_url":"https://api.github.com/users/tirannilakshe/followers","following_url":"https://api.github.com/users/tirannilakshe/following{/other_user}","gists_url":"https://api.github.com/users/tirannilakshe/gists{/gist_id}","starred_url":"https://api.github.com/users/tirannilakshe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tirannilakshe/subscriptions","organizations_url":"https://api.github.com/users/tirannilakshe/orgs","repos_url":"https://api.github.com/users/tirannilakshe/repos","events_url":"https://api.github.com/users/tirannilakshe/events{/privacy}","received_events_url":"https://api.github.com/users/tirannilakshe/received_events","type":"User","site_admin":false},"labels":[{"id":281692141,"url":"https://api.github.com/repos/malle-pietje/UniFi-API-browser/labels/help%20wanted","name":"help wanted","color":"159818","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":21,"created_at":"2016-08-23T16:03:53Z","updated_at":"2016-11-25T14:48:30Z","closed_at":null,"body":"need to create vouchers and print vouchers from api\n"},"comment":{"url":"https://api.github.com/repos/malle-pietje/UniFi-API-browser/issues/comments/262970864","html_url":"https://github.com/malle-pietje/UniFi-API-browser/issues/10#issuecomment-262970864","issue_url":"https://api.github.com/repos/malle-pietje/UniFi-API-browser/issues/10","id":262970864,"user":{"login":"malle-pietje","id":12016131,"avatar_url":"https://avatars.githubusercontent.com/u/12016131?v=3","gravatar_id":"","url":"https://api.github.com/users/malle-pietje","html_url":"https://github.com/malle-pietje","followers_url":"https://api.github.com/users/malle-pietje/followers","following_url":"https://api.github.com/users/malle-pietje/following{/other_user}","gists_url":"https://api.github.com/users/malle-pietje/gists{/gist_id}","starred_url":"https://api.github.com/users/malle-pietje/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/malle-pietje/subscriptions","organizations_url":"https://api.github.com/users/malle-pietje/orgs","repos_url":"https://api.github.com/users/malle-pietje/repos","events_url":"https://api.github.com/users/malle-pietje/events{/privacy}","received_events_url":"https://api.github.com/users/malle-pietje/received_events","type":"User","site_admin":false},"created_at":"2016-11-25T14:48:30Z","updated_at":"2016-11-25T14:48:30Z","body":"@tiransa This function should let you create hotspot operators. Could you please test and confirm back if it's working?\r\n```\r\n    /**\r\n     * Create hotspot operator\r\n     * -----------------\r\n     * returns TRUE upon success\r\n     * required parameter <name>       = name for the hotspot operator\r\n     * required parameter <x_password> = clear text password for the hotspot operator\r\n     * optional parameter <note>       = note to attach to the hotspot operator\r\n     */\r\n    public function create_hotspotop($name, $x_password, $note = NULL) {\r\n        if (!$this->is_loggedin) return FALSE;\r\n        $return = FALSE;\r\n        $json   = array('name' => $name, 'x_password' => $x_password);\r\n        /**\r\n         * if we have received a value for note, we append it to the payload array to be submitted\r\n         */\r\n        if (isset($note)) $json['note'] = trim($note);\r\n        $json            = json_encode($json);\r\n        $content_decoded = json_decode($this->exec_curl($this->baseurl.'/api/s/'.$this->site.'/rest/hotspotop','json='.$json));\r\n        if (isset($content_decoded->meta->rc)) {\r\n            if ($content_decoded->meta->rc == 'ok') {\r\n                $return = TRUE;\r\n            }\r\n        }\r\n\r\n        return $return;\r\n    }\r\n```\r\n"}}
{"actor":{"display_login":"malle-pietje"}}