BibleBrainSharp by markivan.basto

<PackageReference Include="BibleBrainSharp" Version="0.3.0-beta" />

 BibleBrainClient

public class BibleBrainClient : IDisposable
using BibleBrainSharp.Models; using System; using System.Collections.Generic; using System.Net.Http; using System.Runtime.CompilerServices; using System.Threading.Tasks; namespace BibleBrainSharp { public class BibleBrainClient : IDisposable { private readonly HttpClient httpClient; [AsyncStateMachine(typeof(<GetAlphabets>d__0))] public Task<AlphabetsResult> GetAlphabets() { <GetAlphabets>d__0 stateMachine = default(<GetAlphabets>d__0); stateMachine.<>t__builder = AsyncTaskMethodBuilder<AlphabetsResult>.Create(); stateMachine.<>4__this = this; stateMachine.<>1__state = -1; stateMachine.<>t__builder.Start(ref stateMachine); return stateMachine.<>t__builder.Task; } [AsyncStateMachine(typeof(<GetAlphabet>d__1))] public Task<AlphabetInfoResult> GetAlphabet(string alphabetId) { <GetAlphabet>d__1 stateMachine = default(<GetAlphabet>d__1); stateMachine.<>t__builder = AsyncTaskMethodBuilder<AlphabetInfoResult>.Create(); stateMachine.<>4__this = this; stateMachine.alphabetId = alphabetId; stateMachine.<>1__state = -1; stateMachine.<>t__builder.Start(ref stateMachine); return stateMachine.<>t__builder.Task; } [AsyncStateMachine(typeof(<GetBibles>d__2))] public Task<IList<Bible>> GetBibles(string language_code = null, string asset_id = null, MediaType? media = default(MediaType?), MediaType? media_exclude = default(MediaType?), string size = null, string size_exclude = null) { <GetBibles>d__2 stateMachine = default(<GetBibles>d__2); stateMachine.<>t__builder = AsyncTaskMethodBuilder<IList<Bible>>.Create(); stateMachine.<>4__this = this; stateMachine.language_code = language_code; stateMachine.asset_id = asset_id; stateMachine.media = media; stateMachine.media_exclude = media_exclude; stateMachine.size = size; stateMachine.size_exclude = size_exclude; stateMachine.<>1__state = -1; stateMachine.<>t__builder.Start(ref stateMachine); return stateMachine.<>t__builder.Task; } [AsyncStateMachine(typeof(<GetBible>d__3))] public Task<BibleInfoResult> GetBible(string bibleId) { <GetBible>d__3 stateMachine = default(<GetBible>d__3); stateMachine.<>t__builder = AsyncTaskMethodBuilder<BibleInfoResult>.Create(); stateMachine.<>4__this = this; stateMachine.bibleId = bibleId; stateMachine.<>1__state = -1; stateMachine.<>t__builder.Start(ref stateMachine); return stateMachine.<>t__builder.Task; } [AsyncStateMachine(typeof(<GetBooks>d__4))] public Task<BooksResult> GetBooks(string bibleId) { <GetBooks>d__4 stateMachine = default(<GetBooks>d__4); stateMachine.<>t__builder = AsyncTaskMethodBuilder<BooksResult>.Create(); stateMachine.<>4__this = this; stateMachine.bibleId = bibleId; stateMachine.<>1__state = -1; stateMachine.<>t__builder.Start(ref stateMachine); return stateMachine.<>t__builder.Task; } [AsyncStateMachine(typeof(<GetCopyright>d__5))] public Task<IList<Copyright>> GetCopyright(string bibleId) { <GetCopyright>d__5 stateMachine = default(<GetCopyright>d__5); stateMachine.<>t__builder = AsyncTaskMethodBuilder<IList<Copyright>>.Create(); stateMachine.<>4__this = this; stateMachine.bibleId = bibleId; stateMachine.<>1__state = -1; stateMachine.<>t__builder.Start(ref stateMachine); return stateMachine.<>t__builder.Task; } [AsyncStateMachine(typeof(<GetChapter>d__6))] public Task<VersesResult> GetChapter(string fileSetId, string bookId, int chapter) { <GetChapter>d__6 stateMachine = default(<GetChapter>d__6); stateMachine.<>t__builder = AsyncTaskMethodBuilder<VersesResult>.Create(); stateMachine.<>4__this = this; stateMachine.fileSetId = fileSetId; stateMachine.bookId = bookId; stateMachine.chapter = chapter; stateMachine.<>1__state = -1; stateMachine.<>t__builder.Start(ref stateMachine); return stateMachine.<>t__builder.Task; } [AsyncStateMachine(typeof(<GetDefaultBibles>d__7))] public Task<IDictionary<string, DefaultBible>> GetDefaultBibles() { <GetDefaultBibles>d__7 stateMachine = default(<GetDefaultBibles>d__7); stateMachine.<>t__builder = AsyncTaskMethodBuilder<IDictionary<string, DefaultBible>>.Create(); stateMachine.<>4__this = this; stateMachine.<>1__state = -1; stateMachine.<>t__builder.Start(ref stateMachine); return stateMachine.<>t__builder.Task; } [AsyncStateMachine(typeof(<GetMediaTypes>d__8))] public Task<IDictionary<MediaType, string>> GetMediaTypes() { <GetMediaTypes>d__8 stateMachine = default(<GetMediaTypes>d__8); stateMachine.<>t__builder = AsyncTaskMethodBuilder<IDictionary<MediaType, string>>.Create(); stateMachine.<>4__this = this; stateMachine.<>1__state = -1; stateMachine.<>t__builder.Start(ref stateMachine); return stateMachine.<>t__builder.Task; } [AsyncStateMachine(typeof(<GetCountries>d__9))] public Task<IList<Country>> GetCountries(string l10n = null, bool? include_languages = default(bool?)) { <GetCountries>d__9 stateMachine = default(<GetCountries>d__9); stateMachine.<>t__builder = AsyncTaskMethodBuilder<IList<Country>>.Create(); stateMachine.<>4__this = this; stateMachine.l10n = l10n; stateMachine.include_languages = include_languages; stateMachine.<>1__state = -1; stateMachine.<>t__builder.Start(ref stateMachine); return stateMachine.<>t__builder.Task; } [AsyncStateMachine(typeof(<GetCountry>d__10))] public Task<CountryInfoResult> GetCountry(string countryId) { <GetCountry>d__10 stateMachine = default(<GetCountry>d__10); stateMachine.<>t__builder = AsyncTaskMethodBuilder<CountryInfoResult>.Create(); stateMachine.<>4__this = this; stateMachine.countryId = countryId; stateMachine.<>1__state = -1; stateMachine.<>t__builder.Start(ref stateMachine); return stateMachine.<>t__builder.Task; } public BibleBrainClient(string apiKey) : this(apiKey, new HttpClient()) { } public BibleBrainClient(string apiKey, HttpClient httpClient) { this.httpClient = httpClient; this.httpClient.BaseAddress = new Uri(ApiEndpoints.Base); this.httpClient.DefaultRequestHeaders.Add("v", "4"); this.httpClient.DefaultRequestHeaders.Add("key", apiKey); } public void Dispose() { httpClient.Dispose(); } [AsyncStateMachine(typeof(<GetLanguages>d__15))] public Task<IList<Language>> GetLanguages(string country = null, string language_code = null, string language_name = null, bool? include_translations = default(bool?)) { <GetLanguages>d__15 stateMachine = default(<GetLanguages>d__15); stateMachine.<>t__builder = AsyncTaskMethodBuilder<IList<Language>>.Create(); stateMachine.<>4__this = this; stateMachine.country = country; stateMachine.language_code = language_code; stateMachine.language_name = language_name; stateMachine.include_translations = include_translations; stateMachine.<>1__state = -1; stateMachine.<>t__builder.Start(ref stateMachine); return stateMachine.<>t__builder.Task; } [AsyncStateMachine(typeof(<GetLanguage>d__16))] public Task<LanguageInfoResult> GetLanguage(int languageId) { <GetLanguage>d__16 stateMachine = default(<GetLanguage>d__16); stateMachine.<>t__builder = AsyncTaskMethodBuilder<LanguageInfoResult>.Create(); stateMachine.<>4__this = this; stateMachine.languageId = languageId; stateMachine.<>1__state = -1; stateMachine.<>t__builder.Start(ref stateMachine); return stateMachine.<>t__builder.Task; } [AsyncStateMachine(typeof(<GetNumbers>d__17))] public Task<NumbersResult> GetNumbers() { <GetNumbers>d__17 stateMachine = default(<GetNumbers>d__17); stateMachine.<>t__builder = AsyncTaskMethodBuilder<NumbersResult>.Create(); stateMachine.<>4__this = this; stateMachine.<>1__state = -1; stateMachine.<>t__builder.Start(ref stateMachine); return stateMachine.<>t__builder.Task; } [AsyncStateMachine(typeof(<GetNumber>d__18))] public Task<NumberInfoResult> GetNumber(string numeralSystem) { <GetNumber>d__18 stateMachine = default(<GetNumber>d__18); stateMachine.<>t__builder = AsyncTaskMethodBuilder<NumberInfoResult>.Create(); stateMachine.<>4__this = this; stateMachine.numeralSystem = numeralSystem; stateMachine.<>1__state = -1; stateMachine.<>t__builder.Start(ref stateMachine); return stateMachine.<>t__builder.Task; } [AsyncStateMachine(typeof(<Search>d__19))] public Task<IList<Search>> Search(string query, string fileset_id, string[] books = null) { <Search>d__19 stateMachine = default(<Search>d__19); stateMachine.<>t__builder = AsyncTaskMethodBuilder<IList<BibleBrainSharp.Models.Search>>.Create(); stateMachine.<>4__this = this; stateMachine.query = query; stateMachine.fileset_id = fileset_id; stateMachine.books = books; stateMachine.<>1__state = -1; stateMachine.<>t__builder.Start(ref stateMachine); return stateMachine.<>t__builder.Task; } [AsyncStateMachine(typeof(<GetFileSetsWithTimestamps>d__20))] public Task<IList<FileSetId>> GetFileSetsWithTimestamps() { <GetFileSetsWithTimestamps>d__20 stateMachine = default(<GetFileSetsWithTimestamps>d__20); stateMachine.<>t__builder = AsyncTaskMethodBuilder<IList<FileSetId>>.Create(); stateMachine.<>4__this = this; stateMachine.<>1__state = -1; stateMachine.<>t__builder.Start(ref stateMachine); return stateMachine.<>t__builder.Task; } [AsyncStateMachine(typeof(<GetTimestamps>d__21))] public Task<TimestampsResult> GetTimestamps(string fileSetId, string bookId, int chapter) { <GetTimestamps>d__21 stateMachine = default(<GetTimestamps>d__21); stateMachine.<>t__builder = AsyncTaskMethodBuilder<TimestampsResult>.Create(); stateMachine.<>4__this = this; stateMachine.fileSetId = fileSetId; stateMachine.bookId = bookId; stateMachine.chapter = chapter; stateMachine.<>1__state = -1; stateMachine.<>t__builder.Start(ref stateMachine); return stateMachine.<>t__builder.Task; } } }