<commit_before>using System;
using System.Collections.Specialized;
using Skybrud.Social.Exceptions;
using Skybrud.Social.Http;
using Skybrud.Social.Instagram.Endpoints.Raw;
using Skybrud.Social.Instagram.Responses.Authentication;
using Skybrud.Social.Instagram.Scopes;

namespace Skybrud.Social.Instagram.OAuth {

    /// <summary>
    /// Class for handling the raw communication with the Instagram API as well as any OAuth 2.0
    /// communication/authentication.
    /// </summary>
    public class InstagramOAuthClient : SocialHttpClient {

        #region Properties

        /// <summary>
        /// Gets or sets the ID of the app/client.
        /// </summary>
        public string ClientId { get; set; }

        /// <summary>
        /// Gets or sets the secret of the app/client.
        /// </summary>
        public string ClientSecret { get; set; }
        
        /// <summary>
        /// Gets or sets the redirect URI of your application.
        /// </summary>
        public string RedirectUri { get; set; }

        /// <summary>
        /// Gets or sets the access token.
        /// </summary>
        public string AccessToken { get; set; }

        /// <summary>
        /// Gets a reference to the locations endpoint.
        /// </summary>
        public InstagramLocationsRawEndpoint Locations { get; private set; }

        /// <summary>
        /// Gets a reference to the media endpoint.
        /// </summary>
        public InstagramMediaRawEndpoint Media { get; private set; }

        /// <summary>
        /// Gets a reference to the relationships endpoint.
        /// </summary>
        public InstagramRelationshipsRawEndpoint Relationships { get; private set; }

        /// <summary>
        /// Gets a reference to the tags endpoint.
        /// </summary>
        public InstagramTagsRawEndpoint Tags { get; private set; }

        /// <summary>
        /// Gets a reference to the users endpoint.
        /// </summary>
        public InstagramUsersRawEndpoint Users { get; private set; }

        #endregion

        #region Constructors

        /// <summary>
        /// Initializes an OAuth client with empty information.
        /// </summary>
        public InstagramOAuthClient() {
            Locations = new InstagramLocationsRawEndpoint(this);
            Media = new InstagramMediaRawEndpoint(this);
            Relationships = new InstagramRelationshipsRawEndpoint(this);
            Tags = new InstagramTagsRawEndpoint(this);
            Users = new InstagramUsersRawEndpoint(this);
        }

        /// <summary>
        /// Initializes an OAuth client with the specified <code>accessToken</code>. Using this initializer, the client
        /// will have no information about your app.
        /// </summary>
        /// <param name="accessToken">A valid access token.</param>
        public InstagramOAuthClient(string accessToken) {
            AccessToken = accessToken;
        }
        
        /// <summary>
        /// Initializes an OAuth client with the specified <code>clientId</code> and <code>clientSecret</code>.
        /// </summary>
        /// <param name="clientId">The ID of the client/app.</param>
        /// <param name="clientSecret">The secret of the client/app.</param>
        public InstagramOAuthClient(string clientId, string clientSecret) {
            ClientId = clientId;
            ClientSecret = clientSecret;
        }

        /// <summary>
        /// Initializes an OAuth client with the specified <code>clientId</code>, <code>clientSecret</code> and <code>redirectUri</code>.
        /// </summary>
        /// <param name="clientId">The ID of the client/app.</param>
        /// <param name="clientSecret">The secret of the client/app.</param>
        /// <param name="redirectUri">The return URI of the client/app.</param>
        public InstagramOAuthClient(string clientId, string clientSecret, string redirectUri) {
            ClientId = clientId;
            ClientSecret = clientSecret;
            RedirectUri = redirectUri;
        }

        #endregion

        #region Methods

        /// <summary>
        /// Gets an authorization URL using the specified <code>state</code>. This URL will only make your application
        /// request a basic scope.<commit_msg>#H5IS some more<commit_after>using System;
using System.Collections.Specialized;
using Skybrud.Social.Exceptions;
using Skybrud.Social.Http;
using Skybrud.Social.Instagram.Endpoints.Raw;
using Skybrud.Social.Instagram.Responses.Authentication;
using Skybrud.Social.Instagram.Scopes;

namespace Skybrud.Social.Instagram.OAuth {

    /// <summary>
    /// Class for handling the raw communication with the Instagram API as well as any OAuth 2.0
    /// communication/authentication.
    /// </summary>
    public class InstagramOAuthClient : SocialHttpClient {

        #region Properties

        /// <summary>
        /// Gets or sets the ID of the app/client.
        /// </summary>
        public string ClientId { get; set; }

        /// <summary>
        /// Gets or sets the secret of the app/client.
        /// </summary>
        public string ClientSecret { get; set; }
        
        /// <summary>
        /// Gets or sets the redirect URI of your application.
        /// </summary>
        public string RedirectUri { get; set; }

        /// <summary>
        /// Gets or sets the access token.
        /// </summary>
        public string AccessToken { get; set; }

        /// <summary>
        /// Gets a reference to the locations endpoint.
        /// </summary>
        public InstagramLocationsRawEndpoint Locations { get; private set; }

        /// <summary>
        /// Gets a reference to the media endpoint.
        /// </summary>
        public InstagramMediaRawEndpoint Media { get; private set; }

        /// <summary>
        /// Gets a reference to the relationships endpoint.
        /// </summary>
        public InstagramRelationshipsRawEndpoint Relationships { get; private set; }

        /// <summary>
        /// Gets a reference to the tags endpoint.
        /// </summary>
        public InstagramTagsRawEndpoint Tags { get; private set; }

        /// <summary>
        /// Gets a reference to the users endpoint.
        /// </summary>
        public InstagramUsersRawEndpoint Users { get; private set; }

        #endregion

        #region Constructors

        /// <summary>
        /// Initializes an OAuth client with empty information.
        /// </summary>
        public InstagramOAuthClient() {
            Locations = new InstagramLocationsRawEndpoint(this);
            Media = new InstagramMediaRawEndpoint(this);
            Relationships = new InstagramRelationshipsRawEndpoint(this);
            Tags = new InstagramTagsRawEndpoint(this);
            Users = new InstagramUsersRawEndpoint(this);
        }

        /// <summary>
        /// Initializes an OAuth client with the specified <code>accessToken</code>. Using this initializer, the client
        /// will have no information about your app.
        /// </summary>
        /// <param name="accessToken">A valid access token.</param>
        public InstagramOAuthClient(string accessToken) : this() {
            AccessToken = accessToken;
        }
        
        /// <summary>
        /// Initializes an OAuth client with the specified <code>clientId</code> and <code>clientSecret</code>.
        /// </summary>
        /// <param name="clientId">The ID of the client/app.</param>
        /// <param name="clientSecret">The secret of the client/app.</param>
        public InstagramOAuthClient(string clientId, string clientSecret) : this() {
            ClientId = clientId;
            ClientSecret = clientSecret;
        }

        /// <summary>
        /// Initializes an OAuth client with the specified <code>clientId</code>, <code>clientSecret</code> and <code>redirectUri</code>.
        /// </summary>
        /// <param name="clientId">The ID of the client/app.</param>
        /// <param name="clientSecret">The secret of the client/app.</param>
        /// <param name="redirectUri">The return URI of the client/app.</param>
        public InstagramOAuthClient(string clientId, string clientSecret, string redirectUri) : this() {
            ClientId = clientId;
            ClientSecret = clientSecret;
            RedirectUri = redirectUri;
        }

        #endregion

        #region Methods

        /// <summary>
        /// Gets an authorization URL using the specified <code>state</code>. This URL will only make your application
        /// request a basic scope.
{'fraction_non_alphanumeric': 0.11130515775992549, 'fraction_numerical': 0.0005821399464431249, 'mean_word_length': 2.006650332516626, 'pattern_counts': {'":': 0, '<': 113, '<?xml version=': 0, '>': 113, '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': '3869483', 'n_tokens_mistral': 2148, 'n_tokens_neox': 2085, 'n_words': 678}