예제 #1
0
        public ComicVineIssue GetComicVineIssue(int volumeId, int issueNumber)
        {
            ComicVineIssue comicVineIssue = new ComicVineIssue();

            string query = null;

            if (this.SearchType == SearchType.Xml)
            {
                query = this.ComicVineAddress + "issues/?api_key=" + this.ComicVineKey + "&format=xml&field_list=id,api_detail_url,issue_number,cover_date,name,image,person_credits,character_credits,volume&filter=issue_number:" + issueNumber.ToString() + ",volume:" + volumeId.ToString();
            }
            else
            {
                query = this.ComicVineAddress + "issues/?api_key=" + this.ComicVineKey + "&format=json&field_list=id,api_detail_url,issue_number,cover_date,name,image,person_credits,character_credits,volume&filter=issue_number:" + issueNumber.ToString() + ",volume:" + volumeId.ToString();
            }

            Task <ComicVineResponse> firstResponse = ComicVineConnection.ConnectAndRequest(query);

            comicVineIssue = ComicVineReader.GetIssue(this.SearchType, firstResponse.Result.Response, issueNumber, false);

            if (comicVineIssue.id > 0)
            {
                return(GetComicVineIssue(comicVineIssue.id));
            }
            else
            {
                return(comicVineIssue);
            }
        }
예제 #2
0
        public ComicVineIssue GetComicVineIssue(int issueId)
        {
            ComicVineIssue comicVineIssue = new ComicVineIssue();

            string query = null;

            if (this.SearchType == SearchType.Xml)
            {
                query = this.ComicVineAddress + "issue/4000-" + issueId.ToString() + "/?api_key=" + this.ComicVineKey + "&format=xml&field_list=id,api_detail_url,description,image,issue_number,name,person_credits,character_credits,cover_date,volume";
            }
            else
            {
                query = this.ComicVineAddress + "issue/4000-" + issueId.ToString() + "/?api_key=" + this.ComicVineKey + "&format=json&field_list=id,api_detail_url,description,image,issue_number,name,person_credits,character_credits,cover_date,volume";
            }

            Task <ComicVineResponse> firstResponse = ComicVineConnection.ConnectAndRequest(query);

            comicVineIssue = ComicVineReader.GetIssue(this.SearchType, firstResponse.Result.Response, true);


            return(comicVineIssue);
        }