<commit_before>//
//  Quizlet.h
//  ios_quizlet_client
//
//  Created by <NAME> on 8/17/14.
//  Copyright (c) 2014 <NAME>. All rights reserved.
//
//  Latest code can be found on GitHub: https://github.com/maximbilan/ios_quizlet_client
//

#import <Foundation/Foundation.h>

/**
 The Quizlet API lets you create, search, and modify flashcard sets and classes, and much more in your own application.
 */
@interface Quizlet : NSObject

/**
 Client ID (used for public and user access).
 */
@property (nonatomic, strong, readonly) NSString *clientID;

/**
 Secret Key (used for user authentication only).
 */
@property (nonatomic, strong, readonly) NSString *secretKey;

/**
 The "redirect URI" is where our server will redirect users to after they approve (or deny) your application at the authorize endpoint.
 */
@property (nonatomic, strong, readonly) NSString *redirectURI;

/**
 Shared Quizlet object.
 */
+ (Quizlet *)sharedQuizlet;

/**
 Setup the Quizlet client ID, secret key and redirect URI.
 */
- (void)startWithClientID:(NSString *)clientId withSecretKey:(NSString *)secretKey withRedirectURI:(NSString *)redirectURI;

/**
 Checks if the user is authenticated?
 */
@property (NS_NONATOMIC_IOSONLY, getter=isAuthorized, readonly) BOOL authorized;

/**
 Checks if the user has free account type
 */
@property (NS_NONATOMIC_IOSONLY, getter=isFreeAccountType, readonly) BOOL freeAccountType;

/**
 Checks if the user has plus account type
 */
@property (NS_NONATOMIC_IOSONLY, getter=isPlusAccountType, readonly) BOOL plusAccountType;

/**
 Returns current access token
 */
- (NSString *)accessToken;

/**
 Authorization to Quizlet service. Goes to browser, and after entering login and password calls the redirect URI. Auth 2.0.
 */
- (void)authorize:(void (^)(void))success failure:(void (^)(NSError *error))failure;

/**
 You should use in app delegate after redirecting from authorization. This method request an access token from Quizlet authorization server.
 */
- (BOOL)handleURL:(NSURL *)url;<commit_msg>Code review<commit_after>//
//  Quizlet.h
//  ios_quizlet_client
//
//  Created by <NAME> on 8/17/14.
//  Copyright (c) 2014 <NAME>. All rights reserved.
//
//  Latest code can be found on GitHub: https://github.com/maximbilan/ios_quizlet_client
//

#import <Foundation/Foundation.h>

/**
 The Quizlet API lets you create, search, and modify flashcard sets and classes, and much more in your own application.
 */
@interface Quizlet : NSObject

/**
 Client ID (used for public and user access).
 */
@property (nonatomic, strong, readonly) NSString *clientID;

/**
 Secret Key (used for user authentication only).
 */
@property (nonatomic, strong, readonly) NSString *secretKey;

/**
 The "redirect URI" is where our server will redirect users to after they approve (or deny) your application at the authorize endpoint.
 */
@property (nonatomic, strong, readonly) NSString *redirectURI;

/**
 Shared Quizlet object.
 */
+ (Quizlet *)sharedQuizlet;

/**
 Setup the Quizlet client ID, secret key and redirect URI.
 */
- (void)startWithClientID:(NSString *)clientId withSecretKey:(NSString *)secretKey withRedirectURI:(NSString *)redirectURI;

/**
 Checks if the user is authenticated?
 */
@property (NS_NONATOMIC_IOSONLY, getter=isAuthorized, readonly) BOOL authorized;

/**
 Checks if the user has free account type
 */
@property (NS_NONATOMIC_IOSONLY, getter=isFreeAccountType, readonly) BOOL freeAccountType;

/**
 Checks if the user has plus account type
 */
@property (NS_NONATOMIC_IOSONLY, getter=isPlusAccountType, readonly) BOOL plusAccountType;

/**
 Returns current access token
 */
@property (NS_NONATOMIC_IOSONLY, readonly, copy) NSString *accessToken;

/**
 Authorization to Quizlet service. Goes to browser, and after entering login and password calls the redirect URI. Auth 2.0.
 */
- (void)authorize:(void (^)(void))success failure:(void (^)(NSError *error))failure;

/**
 You should use in app delegate after redirecting from authorization. This method request an access token from Quizlet authorization server.
 */
- (BOOL)handleURL:(NSURL *)url;
{'fraction_non_alphanumeric': 0.11331861662987491, 'fraction_numerical': 0.005396124601422614, 'mean_word_length': 4.540760869565218, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 2, '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': '1129', 'n_tokens_mistral': 1266, 'n_tokens_neox': 1192, 'n_words': 436}