<commit_before>﻿using System.Collections.Generic;
using System.Threading.Tasks;
﻿using System;
﻿using RestSharp;
using TMDbLib.Objects.General;
using TMDbLib.Objects.Genres;

namespace TMDbLib.Client
{
    public partial class TMDbClient
    {
        // TODO: This method no longer appears in Apiary
        [Obsolete]
        public async Task<List<Genre>> GetGenres()
        {
            return await GetGenres(DefaultLanguage);
        }

        // TODO: This method no longer appears in Apiary
        [Obsolete]
        public async Task<List<Genre>> GetGenres(string language)
        {
            RestRequest req = new RestRequest("genre/list");

            language = language ?? DefaultLanguage;
            if (!String.IsNullOrWhiteSpace(language))
                req.AddParameter("language", language);

            IRestResponse<GenreContainer> resp = await _client.ExecuteGetTaskAsync<GenreContainer>(req).ConfigureAwait(false);

            if (resp.Data == null)
                return null;

            return resp.Data.Genres;
        }

        public async Task<List<Genre>> GetMovieGenres()
        {
            return await GetMovieGenres(DefaultLanguage);
        }

        public async Task<List<Genre>> GetMovieGenres(string language)
        {
            RestRequest req = new RestRequest("genre/movie/list");

            language = language ?? DefaultLanguage;
            if (!String.IsNullOrWhiteSpace(language))
                req.AddParameter("language", language);

            IRestResponse<GenreContainer> resp = await _client.ExecuteGetTaskAsync<GenreContainer>(req);

            if (resp.Data == null)
                return null;

            return resp.Data.Genres;
        }

        public async Task<List<Genre>> GetTvGenres()
        {
            return await GetTvGenres(DefaultLanguage);
        }

        public async Task<List<Genre>> GetTvGenres(string language)
        {
            RestRequest req = new RestRequest("genre/tv/list");

            language = language ?? DefaultLanguage;
            if (!String.IsNullOrWhiteSpace(language))
                req.AddParameter("language", language);

            IRestResponse<GenreContainer> resp = await _client.ExecuteGetTaskAsync<GenreContainer>(req);

            if (resp.Data == null)
                return null;

            return resp.Data.Genres;
        }

        public async Task<SearchContainerWithId<MovieResult>> GetGenreMovies(int genreId, int page = 0, bool? includeAllMovies = null)
        {
            return await GetGenreMovies(genreId, DefaultLanguage, page, includeAllMovies);
        }

        public async Task<SearchContainerWithId<MovieResult>> GetGenreMovies(int genreId, string language, int page = 0, bool? includeAllMovies = null)
        {
            RestRequest req = new RestRequest("genre/{genreId}/movies");
            req.AddUrlSegment("genreId", genreId.ToString());

            language = language ?? DefaultLanguage;
            if (!String.IsNullOrWhiteSpace(language))
                req.AddParameter("language", language);

            if (page >= 1)
                req.AddParameter("page", page);
            if (includeAllMovies.HasValue)
                req.AddParameter("include_all_movies", includeAllMovies.Value ? "true" : "false");

            IRestResponse<SearchContainerWithId<MovieResult>> resp = await _client.ExecuteGetTaskAsync<SearchContainerWithId<MovieResult>>(req).ConfigureAwait(false);

            return resp.Data;
        }
    }
}<commit_msg>Removed Obsolete methods<commit_after>﻿using System.Collections.Generic;
using System.Threading.Tasks;
﻿using System;
﻿using RestSharp;
using TMDbLib.Objects.General;
using TMDbLib.Objects.Genres;

namespace TMDbLib.Client
{
    public partial class TMDbClient
    {
        public async Task<List<Genre>> GetMovieGenres()
        {
            return await GetMovieGenres(DefaultLanguage);
        }

        public async Task<List<Genre>> GetMovieGenres(string language)
        {
            RestRequest req = new RestRequest("genre/movie/list");

            language = language ?? DefaultLanguage;
            if (!String.IsNullOrWhiteSpace(language))
                req.AddParameter("language", language);

            IRestResponse<GenreContainer> resp = await _client.ExecuteGetTaskAsync<GenreContainer>(req);

            if (resp.Data == null)
                return null;

            return resp.Data.Genres;
        }

        public async Task<List<Genre>> GetTvGenres()
        {
            return await GetTvGenres(DefaultLanguage);
        }

        public async Task<List<Genre>> GetTvGenres(string language)
        {
            RestRequest req = new RestRequest("genre/tv/list");

            language = language ?? DefaultLanguage;
            if (!String.IsNullOrWhiteSpace(language))
                req.AddParameter("language", language);

            IRestResponse<GenreContainer> resp = await _client.ExecuteGetTaskAsync<GenreContainer>(req);

            if (resp.Data == null)
                return null;

            return resp.Data.Genres;
        }

        public async Task<SearchContainerWithId<MovieResult>> GetGenreMovies(int genreId, int page = 0, bool? includeAllMovies = null)
        {
            return await GetGenreMovies(genreId, DefaultLanguage, page, includeAllMovies);
        }

        public async Task<SearchContainerWithId<MovieResult>> GetGenreMovies(int genreId, string language, int page = 0, bool? includeAllMovies = null)
        {
            RestRequest req = new RestRequest("genre/{genreId}/movies");
            req.AddUrlSegment("genreId", genreId.ToString());

            language = language ?? DefaultLanguage;
            if (!String.IsNullOrWhiteSpace(language))
                req.AddParameter("language", language);

            if (page >= 1)
                req.AddParameter("page", page);
            if (includeAllMovies.HasValue)
                req.AddParameter("include_all_movies", includeAllMovies.Value ? "true" : "false");

            IRestResponse<SearchContainerWithId<MovieResult>> resp = await _client.ExecuteGetTaskAsync<SearchContainerWithId<MovieResult>>(req).ConfigureAwait(false);

            return resp.Data;
        }
    }
}
{'fraction_non_alphanumeric': 0.09642401021711366, 'fraction_numerical': 0.0009578544061302681, 'mean_word_length': 2.3975054229934925, 'pattern_counts': {'":': 0, '<': 49, '<?xml version=': 0, '>': 51, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7371289', 'n_tokens_mistral': 1712, 'n_tokens_neox': 1625, 'n_words': 346}