{"action":"opened","issue":{"url":"https://api.github.com/repos/tableau/server-client-python/issues/104","repository_url":"https://api.github.com/repos/tableau/server-client-python","labels_url":"https://api.github.com/repos/tableau/server-client-python/issues/104/labels{/name}","comments_url":"https://api.github.com/repos/tableau/server-client-python/issues/104/comments","events_url":"https://api.github.com/repos/tableau/server-client-python/issues/104/events","html_url":"https://github.com/tableau/server-client-python/issues/104","id":190327493,"number":104,"title":"Refreshing get() lists","user":{"login":"reevery","id":4381067,"avatar_url":"https://avatars.githubusercontent.com/u/4381067?v=3","gravatar_id":"","url":"https://api.github.com/users/reevery","html_url":"https://github.com/reevery","followers_url":"https://api.github.com/users/reevery/followers","following_url":"https://api.github.com/users/reevery/following{/other_user}","gists_url":"https://api.github.com/users/reevery/gists{/gist_id}","starred_url":"https://api.github.com/users/reevery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reevery/subscriptions","organizations_url":"https://api.github.com/users/reevery/orgs","repos_url":"https://api.github.com/users/reevery/repos","events_url":"https://api.github.com/users/reevery/events{/privacy}","received_events_url":"https://api.github.com/users/reevery/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-18T14:09:11Z","updated_at":"2016-11-18T14:09:11Z","closed_at":null,"body":"I couldn't find this in the docs so apologies for raising here.\r\n\r\nLet's say I've queried the list of projects from my server, then added a new project. Then I want to refresh the list, but re-running get() doesn't update the list.\r\n\r\nHow do I make this work?\r\n\r\n`    with server.auth.sign_in(tableau_auth):\r\n        ## get the list of projects from Tableau\r\n        projects, pagination_info = server.projects.get()\r\n\r\n        # Find local projects which do not exist on Tableau\r\n        for p in (x for x in local_projects if x not in (p.name for p in projects)):\r\n                # Add Project\r\n                new_project = TSC.ProjectItem(name=p)\r\n                try:\r\n                    project_id = server.projects.create(new_project).id\r\n                except TSC.ServerResponseError as e:\r\n                    #TODO\r\n                    pass\r\n    \r\n        projects, pagination_info = server.projects.get()\r\n        for p in projects:\r\n            print(p.name, p.id)`\r\n\r\nThis last iteration is returning the original list of projects, not the new one."}}
{"actor":{"display_login":"reevery"}}