コード例 #1
1
ファイル: Tag.cs プロジェクト: elektrowolf/Forrst-API
 public Tag(JToken json, ForrstClient client)
     : base(client)
 {
     this.ID = json.Value<int>("id");
     this.Name = json.Value<string>("name");
     this.Uri = new Uri(ForrstClient.BaseUri, json.Value<string>("posts_url"));
 }
コード例 #2
0
ファイル: Program.cs プロジェクト: elektrowolf/Forrst-API
        static void Main(string[] args)
        {
            var forrst = new ForrstClient();

            Console.WriteLine("User #1's first post:");
            Console.WriteLine(new User(1, forrst).Posts.First().Content);

            Console.WriteLine();
            Console.WriteLine("Requests done:");
            foreach (var request in forrst.RequestLog)
                Console.WriteLine(request.ToString());

            Console.ReadLine();
        }
コード例 #3
0
ファイル: User.cs プロジェクト: elektrowolf/Forrst-API
 public User(JToken json, ForrstClient client)
     : base(client)
 {
     this.FromJson(json);
 }
コード例 #4
0
ファイル: User.cs プロジェクト: elektrowolf/Forrst-API
 public User(string username, ForrstClient client)
     : base(client)
 {
     this.Username = username;
 }
コード例 #5
0
ファイル: User.cs プロジェクト: elektrowolf/Forrst-API
 public User(int id, ForrstClient client)
     : base(client)
 {
     this.ID = id;
 }
コード例 #6
0
ファイル: Post.cs プロジェクト: elektrowolf/Forrst-API
 public Post(int id, ForrstClient client)
     : base(client)
 {
     this.ID = id;
 }
コード例 #7
0
 public ForrstObject(ForrstClient client)
 {
     this.Client = client;
 }