def setup_oauth_client(self, url=None):
if url and "<STR_LIT>" in url:<EOL><INDENT>server, endpoint = self._deconstruct_url(url)<EOL><DEDENT>else:<EOL><INDENT>server = self.client.server<EOL><DEDENT>if server not in self._server_cache:<EOL><INDENT>self._add_client(server)<EOL><DEDENT>if server == self.client.server:<EOL><INDENT>self.oauth = OAuth1(<EOL>client_key=self.store["<STR_LIT>"],<EOL>client_secret=self.store["<STR_LIT>"],<EOL>resource_owner_key=self.store["<STR_LIT>"],<EOL>resource_owner_secret=self.store["<STR_LIT>"],<EOL>)<EOL>return self.oauth<EOL><DEDENT>else:<EOL><INDENT>return OAuth1(<EOL>client_key=self._server_cache[server].key,<EOL>client_secret=self._server_cache[server].secret,<EOL>)<EOL><DEDENT>
Sets up client for requests to pump