IF.Lastfm/IF.Lastfm.Console/Program.cs

38 lines
875 B
C#
Raw Normal View History

2013-06-08 18:49:21 +01:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
2013-06-08 18:49:21 +01:00
using System.Text;
using System.Threading.Tasks;
2013-06-08 18:49:21 +01:00
using IF.Lastfm.Core;
using IF.Lastfm.Core.Api;
namespace IF.Lastfm.Console
{
class Program
{
private const string ApiKey = "xxx";
private const string ApiSecret = "xxx";
2013-06-08 18:49:21 +01:00
static void Main(string[] args)
{
Run().Wait();
}
public static async Task Run()
{
var auth = new Auth(ApiKey, ApiSecret);
await auth.GetSessionTokenAsync("xxx", "xxx");
var albumApi = new AlbumApi(auth);
var album = await albumApi.GetAlbumInfoAsync("Grimes", "Visions", false);
var req = WebRequest.Create("");
var w = await req.GetRequestStreamAsync();
2013-06-08 18:49:21 +01:00
System.Console.ReadLine();
2013-06-08 18:49:21 +01:00
}
}
}