<commit_before>//
//  User.swift
//  WhoToFollow
//
//  Created by <NAME> on 9/21/15.
//
//

import Foundation
import RxSwift

class User {

    // MARK: - Properties

    let name: String
    let url: String
    let avatarUrl: String

    static let apiClient = GithubAPIClient.sharedInstance


    // MARK: - Initializers

    init(name: String, url: String, avatarUrl: String) {
        self.name = name
        self.url = url
        self.avatarUrl = avatarUrl
    }


    // MARK: - Static methods

    static func fetch() -> Observable<[User]> {
        return self.apiClient.request(path: "users")
            .observeOn(self.apiClient.backgroundScheduler)<commit_msg>Fix to fetch with the random offset<commit_after>//
//  User.swift
//  WhoToFollow
//
//  Created by <NAME> on 9/21/15.
//
//

import Foundation
import RxSwift

class User {

    // MARK: - Properties

    let name: String
    let url: String
    let avatarUrl: String

    static let apiClient = GithubAPIClient.sharedInstance


    // MARK: - Initializers

    init(name: String, url: String, avatarUrl: String) {
        self.name = name
        self.url = url
        self.avatarUrl = avatarUrl
    }


    // MARK: - Static methods

    static func fetch() -> Observable<[User]> {
        let randomOffset = String(arc4random() % 500)
        return self.apiClient.request(path: "users", params: ["since": randomOffset])
            .observeOn(self.apiClient.backgroundScheduler)
{'fraction_non_alphanumeric': 0.11446196024674435, 'fraction_numerical': 0.009595613433858808, 'mean_word_length': 2.3031674208144794, 'pattern_counts': {'":': 1, '<': 7, '<?xml version=': 0, '>': 9, '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': '1335779', 'n_tokens_mistral': 479, 'n_tokens_neox': 432, 'n_words': 120}