コード例 #1
0
ファイル: Beam.cs プロジェクト: AtomicBlom/BeamProSharp
		async Task<IAuthenticatedBeamTasks> IUnauthenticatedBeamTasks.LoginAsync(string username, string password, string twoFactorAuthenticationCode)
		{
			LoginRequest request = new LoginRequest(username, password, twoFactorAuthenticationCode);
			var response = await _client.Post<LoginRequest, LoginResponse>(request);
			SetUser(response);
			return this;
		}
コード例 #2
0
ファイル: Program.cs プロジェクト: AtomicBlom/BeamProSharp
		static async Task DoStuff()
		{
			BeamHttpClient client = new BeamHttpClient();
			var channelTypesRequest = new ChannelTypesRequest()
			{
				Query = "Minecraft"
			};
			var channelTypesResponses = await client.Get<ChannelTypesRequest, ChannelTypesResponse>(channelTypesRequest);

			var loginRequest = new LoginRequest("AtomicBlom", "");
			var loginResponse = await client.Post<LoginRequest, LoginResponse>(loginRequest);

			Console.ReadKey();
		}