{"action":"created","issue":{"url":"https://api.github.com/repos/JMPerez/spotify-web-api-js/issues/101","repository_url":"https://api.github.com/repos/JMPerez/spotify-web-api-js","labels_url":"https://api.github.com/repos/JMPerez/spotify-web-api-js/issues/101/labels{/name}","comments_url":"https://api.github.com/repos/JMPerez/spotify-web-api-js/issues/101/comments","events_url":"https://api.github.com/repos/JMPerez/spotify-web-api-js/issues/101/events","html_url":"https://github.com/JMPerez/spotify-web-api-js/pull/101","id":348637635,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA2OTM5MDA2","number":101,"title":"expose type for spotify web api object","user":{"login":"amelialaundy","id":7699279,"node_id":"MDQ6VXNlcjc2OTkyNzk=","avatar_url":"https://avatars3.githubusercontent.com/u/7699279?v=4","gravatar_id":"","url":"https://api.github.com/users/amelialaundy","html_url":"https://github.com/amelialaundy","followers_url":"https://api.github.com/users/amelialaundy/followers","following_url":"https://api.github.com/users/amelialaundy/following{/other_user}","gists_url":"https://api.github.com/users/amelialaundy/gists{/gist_id}","starred_url":"https://api.github.com/users/amelialaundy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amelialaundy/subscriptions","organizations_url":"https://api.github.com/users/amelialaundy/orgs","repos_url":"https://api.github.com/users/amelialaundy/repos","events_url":"https://api.github.com/users/amelialaundy/events{/privacy}","received_events_url":"https://api.github.com/users/amelialaundy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2018-08-08T09:04:37Z","updated_at":"2018-08-23T06:15:10Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/JMPerez/spotify-web-api-js/pulls/101","html_url":"https://github.com/JMPerez/spotify-web-api-js/pull/101","diff_url":"https://github.com/JMPerez/spotify-web-api-js/pull/101.diff","patch_url":"https://github.com/JMPerez/spotify-web-api-js/pull/101.patch"},"body":"related to https://github.com/JMPerez/spotify-web-api-js/pull/44#issuecomment-336503855\r\n\r\nI would like to be able to return the instantiated client object as opposed to creating a new one each time or keeping the reference to the object within a class as so:\r\n```\r\nimport * as SpotifyWebApi from 'spotify-web-api-js'\r\n\r\nexport const InitiateSpotify = (token: string): SpotifyWebApi.SpotifyWebApiJs  => {\r\n    const client = new SpotifyWebApi();\r\n    client.setAccessToken(token);\r\n    return client;\r\n}\r\n```\r\ntherefore:\r\n\r\n```\r\nimport * as SpotifyWebApi from 'spotify-web-api-js'\r\n.....\r\nclass App extends React.Component<any, IState> {\r\n  private spotifyClient: SpotifyWebApi.SpotifyWebApiJs;\r\n  \r\n  public onTokenSubmit = (token: string) => {\r\n    this.spotifyClient = InitiateSpotify(token);\r\n\r\n  }\r\n...\r\n```\r\nThis allows me to access all of the methods on the client object from calling functions and assign a type to `this.spotifyClient` previously you could not access `SpotifyWebApi.SpotifyWebApiJs`as per the issue linked above\r\n\r\nThe type is not available in the bindings currently as only the methods are exported, I'd like to propose something like this, this code change seems to work as I would like it to."},"comment":{"url":"https://api.github.com/repos/JMPerez/spotify-web-api-js/issues/comments/415304050","html_url":"https://github.com/JMPerez/spotify-web-api-js/pull/101#issuecomment-415304050","issue_url":"https://api.github.com/repos/JMPerez/spotify-web-api-js/issues/101","id":415304050,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNTMwNDA1MA==","user":{"login":"amelialaundy","id":7699279,"node_id":"MDQ6VXNlcjc2OTkyNzk=","avatar_url":"https://avatars3.githubusercontent.com/u/7699279?v=4","gravatar_id":"","url":"https://api.github.com/users/amelialaundy","html_url":"https://github.com/amelialaundy","followers_url":"https://api.github.com/users/amelialaundy/followers","following_url":"https://api.github.com/users/amelialaundy/following{/other_user}","gists_url":"https://api.github.com/users/amelialaundy/gists{/gist_id}","starred_url":"https://api.github.com/users/amelialaundy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amelialaundy/subscriptions","organizations_url":"https://api.github.com/users/amelialaundy/orgs","repos_url":"https://api.github.com/users/amelialaundy/repos","events_url":"https://api.github.com/users/amelialaundy/events{/privacy}","received_events_url":"https://api.github.com/users/amelialaundy/received_events","type":"User","site_admin":false},"created_at":"2018-08-23T06:15:10Z","updated_at":"2018-08-23T06:15:10Z","author_association":"NONE","body":"also looking at the diff the original package-lock had hats for the version and those have been bumped to the highest and then the hat removed hmmm"}}
{"actor":{"display_login":"amelialaundy"}}