{"action":"created","issue":{"url":"https://api.github.com/repos/gunjandatta/sprest/issues/26","repository_url":"https://api.github.com/repos/gunjandatta/sprest","labels_url":"https://api.github.com/repos/gunjandatta/sprest/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/gunjandatta/sprest/issues/26/comments","events_url":"https://api.github.com/repos/gunjandatta/sprest/issues/26/events","html_url":"https://github.com/gunjandatta/sprest/issues/26","id":221968817,"number":26,"title":"Query List with internal name","user":{"login":"johannes-z","id":9069888,"avatar_url":"https://avatars3.githubusercontent.com/u/9069888?v=3","gravatar_id":"","url":"https://api.github.com/users/johannes-z","html_url":"https://github.com/johannes-z","followers_url":"https://api.github.com/users/johannes-z/followers","following_url":"https://api.github.com/users/johannes-z/following{/other_user}","gists_url":"https://api.github.com/users/johannes-z/gists{/gist_id}","starred_url":"https://api.github.com/users/johannes-z/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johannes-z/subscriptions","organizations_url":"https://api.github.com/users/johannes-z/orgs","repos_url":"https://api.github.com/users/johannes-z/repos","events_url":"https://api.github.com/users/johannes-z/events{/privacy}","received_events_url":"https://api.github.com/users/johannes-z/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2017-04-15T19:49:01Z","updated_at":"2017-04-16T00:12:17Z","closed_at":"2017-04-16T00:12:17Z","body":"`/_api/web/lists` exposes the `d:EntityTypeName` property for all lists. By querying `/_api/web/_lists` first, you could select the `d:Title` of the list that matches the `EntityTypeName` and then make the call to `/_api/web/lists/getbytitle('...')`.\r\n\r\nThe downside is to have 2 calls per list site query, but then you don't have any troubles adapting your code if you change the display name.\r\n"},"comment":{"url":"https://api.github.com/repos/gunjandatta/sprest/issues/comments/294325252","html_url":"https://github.com/gunjandatta/sprest/issues/26#issuecomment-294325252","issue_url":"https://api.github.com/repos/gunjandatta/sprest/issues/26","id":294325252,"user":{"login":"gunjandatta","id":18452035,"avatar_url":"https://avatars3.githubusercontent.com/u/18452035?v=3","gravatar_id":"","url":"https://api.github.com/users/gunjandatta","html_url":"https://github.com/gunjandatta","followers_url":"https://api.github.com/users/gunjandatta/followers","following_url":"https://api.github.com/users/gunjandatta/following{/other_user}","gists_url":"https://api.github.com/users/gunjandatta/gists{/gist_id}","starred_url":"https://api.github.com/users/gunjandatta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gunjandatta/subscriptions","organizations_url":"https://api.github.com/users/gunjandatta/orgs","repos_url":"https://api.github.com/users/gunjandatta/repos","events_url":"https://api.github.com/users/gunjandatta/events{/privacy}","received_events_url":"https://api.github.com/users/gunjandatta/received_events","type":"User","site_admin":false},"created_at":"2017-04-16T00:12:17Z","updated_at":"2017-04-16T00:12:17Z","body":"Ok. The library has been updated :)\r\n\r\n```\r\n// Asynchronous Request\r\n$REST.List.getByEntityName(\"SiteAssets\", (list:Types.IList) => {\r\n  // Code goes here\r\n});\r\n\r\n// Synchronous Request\r\nvar list = $REST.List.getByEntityName(\"SiteAssets\");\r\n\r\n// Code goes here\r\n```\r\nHope this helps you out and is the functionality you wanted. I've tested both methods in SharePoint Online. Thanks again for this request. This will be in the npm version 1.3.5. It's been pushed to GitHub.\r\n\r\nI'll close out this issue, but feel free to reopen it if you have issues."}}
{"actor":{"display_login":"gunjandatta"}}