<commit_before>package com.github.scribejava.apis.examples;

import java.util.Scanner;
import com.github.scribejava.core.builder.ServiceBuilder;
import com.github.scribejava.apis.OdnoklassnikiApi;
import com.github.scribejava.core.model.OAuth2AccessToken;
import com.github.scribejava.core.model.OAuthConstants;
import com.github.scribejava.core.model.OAuthRequest;
import com.github.scribejava.core.model.Response;
import com.github.scribejava.core.model.Verb;
import com.github.scribejava.core.oauth.OAuth20Service;

public abstract class OdnoklassnikiExample {

    private static final String NETWORK_NAME = "Odnoklassniki.ru";
    private static final String PROTECTED_RESOURCE_URL
            = "https://api.ok.ru/api/users/getCurrentUser?application_key=%1$s&format=JSON";

    public static void main(String... args) {
        // Replace these with your client id and secret
        final String clientId = "your client id";
        final String publicKey = "your api secret";
        final String clientSecret = "your client secret";

        final OAuth20Service service = new ServiceBuilder()
                .apiKey(clientId)
                .apiSecret(clientSecret)
                .scope("VALUABLE ACCESS")
                .grantType(OAuthConstants.AUTHORIZATION_CODE)
                .callback("http://your.site.com/callback")
                .build(OdnoklassnikiApi.instance());

        final Scanner in = new Scanner(System.in);

        System.out.println("=== " + NETWORK_NAME + "'s OAuth Workflow ===");
        System.out.println();

        // Obtain the Authorization URL
        System.out.println("Fetching the Authorization URL...");
        final String authorizationUrl = service.getAuthorizationUrl();
        System.out.println("Got the Authorization URL!");
        System.out.println("Now go and authorize ScribeJava here:");
        System.out.println(authorizationUrl);
        System.out.println("And paste the authorization code here");
        System.out.print(">>");
        final String code = in.nextLine();
        System.out.println();
<commit_msg>Odnoklassniki Example improvements<commit_after>package com.github.scribejava.apis.examples;

import java.util.Scanner;
import com.github.scribejava.core.builder.ServiceBuilder;
import com.github.scribejava.apis.OdnoklassnikiApi;
import com.github.scribejava.core.model.OAuth2AccessToken;
import com.github.scribejava.core.model.OAuthConstants;
import com.github.scribejava.core.model.OAuthRequest;
import com.github.scribejava.core.model.Response;
import com.github.scribejava.core.model.Verb;
import com.github.scribejava.core.oauth.OAuth20Service;

public abstract class OdnoklassnikiExample {

    private static final String NETWORK_NAME = "Odnoklassniki.ru";
    private static final String PROTECTED_RESOURCE_URL
            = "https://api.ok.ru/api/users/getCurrentUser?application_key=%1$s&format=JSON";

    public static void main(String... args) {
        // Replace these with your client id and secret
        final String clientId  = "your api client id";
        final String publicKey = "your api public key";
        final String secretKey = "your api secret key";

        final OAuth20Service service = new ServiceBuilder()
                .apiKey(clientId)
                .apiSecret(secretKey)
                .scope("VALUABLE_ACCESS")
                .grantType(OAuthConstants.AUTHORIZATION_CODE)
                .callback("http://your.site.com/callback")
                .build(OdnoklassnikiApi.instance());

        final Scanner in = new Scanner(System.in);

        System.out.println("=== " + NETWORK_NAME + "'s OAuth Workflow ===");
        System.out.println();

        // Obtain the Authorization URL
        System.out.println("Fetching the Authorization URL...");
        final String authorizationUrl = service.getAuthorizationUrl();
        System.out.println("Got the Authorization URL!");
        System.out.println("Now go and authorize ScribeJava here:");
        System.out.println(authorizationUrl);
        System.out.println("And paste the authorization code here");
        System.out.print(">>");
        final String code = in.nextLine();
        System.out.println();

{'fraction_non_alphanumeric': 0.10934157356786309, 'fraction_numerical': 0.0028523888756833847, 'mean_word_length': 3.093385214007782, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '6004605', 'n_tokens_mistral': 1194, 'n_tokens_neox': 1163, 'n_words': 254}