Example #1
0
	def get_miis(self, pids):
		req = HTTPRequest.get("/v1/api/miis")
		req.params["pids"] = util.urlencode(",".join([str(pid) for pid in pids]))
		self.prepare(req)
		
		response = self.request(req)
		return [Mii.parse(mii) for mii in response]
Example #2
0
	def get_nnids(self, pids):
		req = HTTPRequest.get("/v1/api/admin/mapped_ids")
		req.params["input_type"] = "pid"
		req.params["output_type"] = "user_id"
		req.params["input"] = util.urlencode(",".join([str(pid) for pid in pids]))
		self.prepare(req)
		
		response = self.request(req)
		return {int(id["in_id"].value): id["out_id"].value for id in response}
Example #3
0
	def get_profile(self):
		req = HTTPRequest.get("/v1/api/people/@me/profile")
		self.prepare(req, self.auth_token)
		return Profile.parse(self.request(req))
Example #4
0
	def get_nex_token(self, game_server_id):
		req = HTTPRequest.get("/v1/api/provider/nex_token/@me")
		req.params["game_server_id"] = "%08X" %game_server_id
		self.prepare(req, self.auth_token)
		return NexToken.parse(self.request(req))
Example #5
0
	def get_emails(self):
		req = HTTPRequest.get("/v1/api/people/@me/emails")
		self.prepare(req, self.auth_token)
		return [Email.parse(email) for email in self.request(req)]