Beispiel #1
0
        public AccountInfo Info()
        {
            string url = $"{_baseURL}info?oauth_token={_accessToken}";

            string json = _client.DownloadString(url);

            return(AccountInfoParser(json));
        }
Beispiel #2
0
        public ZipsList ListZips()
        {
            string url = $"{_baseURL}list?oauth_token={_accessToken}";

            string json = _client.DownloadString(url);

            return(ZipListParser(json));
        }
Beispiel #3
0
        public TransfersList List()
        {
            string url = $"{_baseURL}list?oauth_token={_accessToken}";

            string json = _client.DownloadString(url);

            return(TransferParser(json));
        }
Beispiel #4
0
        public static Zip GetZip(string accessToken, long zipID)
        {
            string url = $"{_baseURL}{zipID}?oauth_token={accessToken}";

            using (putSharpWebClient client = new putSharpWebClient())
            {
                string json = client.DownloadString(url);

                return(ZipParser(json));
            }
        }
Beispiel #5
0
        public static ZipsList ListZips(string accessToken)
        {
            string url = $"{_baseURL}list?oauth_token={accessToken}";

            using (putSharpWebClient client = new putSharpWebClient())
            {
                string json = client.DownloadString(url);

                return(ZipListParser(json));
            }
        }
Beispiel #6
0
        public static Feed Get(string accessToken, long id)
        {
            string url = $"{_baseURL}{id}?oauth_token={accessToken}";

            using (putSharpWebClient client = new putSharpWebClient())
            {
                string json = client.DownloadString(url);

                return(FeedParser(json));
            }
        }
Beispiel #7
0
        public static FriendList FriendRequests(string accessToken)
        {
            string url = $"{_baseURL}waiting-requests?oauth_token={accessToken}";

            using (putSharpWebClient client = new putSharpWebClient())
            {
                string json = client.DownloadString(url);

                return(FriendListParser(json));
            }
        }
Beispiel #8
0
        public static AccountSettings Settings(string accessToken)
        {
            string url = $"{_baseURL}settings?oauth_token={accessToken}";

            using (putSharpWebClient client = new putSharpWebClient())
            {
                string json = client.DownloadString(url);

                return(AccountSettingsParser(json));
            }
        }
Beispiel #9
0
        public FileListResult List(long parentID = 0)
        {
            string url = _baseURL + "list?parent_id=" + parentID + "&oauth_token=" + _accessToken;

            string json = _client.DownloadString(url);

            JsonTextReader reader = new JsonTextReader(new StringReader(json));

            return(FileListParser(json));
        }