<commit_before>package jp.nephy.penicillin.endpoints

import jp.nephy.penicillin.PenicillinClient
import jp.nephy.penicillin.core.streaming.*
import jp.nephy.penicillin.endpoints.parameters.UserStreamFilterLevel
import jp.nephy.penicillin.endpoints.parameters.UserStreamReplies
import jp.nephy.penicillin.endpoints.parameters.UserStreamWith

class Stream(override val client: PenicillinClient): Endpoint {
    @Deprecated("UserStream API retired on August 23th, 2018.", replaceWith = ReplaceWith("Account Activity API (AAA)"))
    fun user(delimited: String? = null, stallWarnings: Boolean? = null, with: UserStreamWith? = null, replies: UserStreamReplies? = null, track: List<String>? = null, filterLevel: UserStreamFilterLevel? = null, language: String? = null, follow: List<Long>? = null, locations: Pair<Float, Float>? = null, count: Int? = null, includeFollowingsActivity: Boolean? = null, stringifyFriendIds: Boolean? = null, vararg options: Pair<String, Any?>) = client.session.get("/1.1/user.json", EndpointHost.UserStream) {
        parameter("delimited" to delimited, "stall_warning" to stallWarnings, "with" to with?.value, "replies" to replies?.value, "track" to track?.joinToString(","), "filter_level" to filterLevel?.value, "language" to language, "follow" to follow?.joinToString(","), "locations" to locations?.toList()?.joinToString(","), "count" to count, "include_followings_activity" to includeFollowingsActivity, "stringify_friend_ids" to stringifyFriendIds, *options)
    }.stream<UserStreamListener, UserStreamHandler>()

    @Deprecated("SiteStream API retired on August 23th, 2018.", replaceWith = ReplaceWith("Account Activity API (AAA)"))
    fun site(delimited: String? = null, stallWarnings: Boolean? = null, with: UserStreamWith? = null, replies: UserStreamReplies? = null, follow: List<Long>? = null, vararg options: Pair<String, Any?>) = client.session.get("/1.1/site.json", EndpointHost.SiteStream) {
        parameter("delimited" to delimited, "stall_warning" to stallWarnings, "with" to with?.value, "replies" to replies?.value, "follow" to follow?.joinToString(","), *options)
    }.stream<UserStreamListener, UserStreamHandler>()

    fun sample(delimited: String? = null, stallWarnings: Boolean? = null, vararg options: Pair<String, Any?>) = client.session.get("/1.1/statuses/sample.json", EndpointHost.Stream) {
        parameter("delimited" to delimited, "stall_warning" to stallWarnings, *options)
    }.stream<SampleStreamListener, SampleStreamHandler>()

    fun filter(delimited: String? = null, stallWarnings: Boolean? = null, track: List<String>? = null, follow: List<Long>? = null, locations: Pair<Float, Float>? = null, vararg options: Pair<String, Any?>) = client.session.post("/1.1/statuses/filter.json", EndpointHost.Stream) {
        body {
            form {
                add("delimited" to delimited, "stall_warning" to stallWarnings, "track" to track?.joinToString(","), "follow" to follow?.joinToString(","), "locations" to locations?.toList()?.joinToString(","), *options)
            }
        }
    }.stream<FilterStreamListener, FilterStreamHandler>()
}<commit_msg>Fix FilterStream endpoint<commit_after>package jp.nephy.penicillin.endpoints

import jp.nephy.penicillin.PenicillinClient
import jp.nephy.penicillin.core.streaming.*
import jp.nephy.penicillin.endpoints.parameters.UserStreamFilterLevel
import jp.nephy.penicillin.endpoints.parameters.UserStreamReplies
import jp.nephy.penicillin.endpoints.parameters.UserStreamWith

class Stream(override val client: PenicillinClient): Endpoint {
    @Deprecated("UserStream API retired on August 23th, 2018.", replaceWith = ReplaceWith("Account Activity API (AAA)"))
    fun user(delimited: String? = null, stallWarnings: Boolean? = null, with: UserStreamWith? = null, replies: UserStreamReplies? = null, track: List<String>? = null, filterLevel: UserStreamFilterLevel? = null, language: String? = null, follow: List<Long>? = null, locations: Pair<Float, Float>? = null, count: Int? = null, includeFollowingsActivity: Boolean? = null, stringifyFriendIds: Boolean? = null, vararg options: Pair<String, Any?>) = client.session.get("/1.1/user.json", EndpointHost.UserStream) {
        parameter("delimited" to delimited, "stall_warning" to stallWarnings, "with" to with?.value, "replies" to replies?.value, "track" to track?.joinToString(","), "filter_level" to filterLevel?.value, "language" to language, "follow" to follow?.joinToString(","), "locations" to locations?.toList()?.joinToString(","), "count" to count, "include_followings_activity" to includeFollowingsActivity, "stringify_friend_ids" to stringifyFriendIds, *options)
    }.stream<UserStreamListener, UserStreamHandler>()

    @Deprecated("SiteStream API retired on August 23th, 2018.", replaceWith = ReplaceWith("Account Activity API (AAA)"))
    fun site(delimited: String? = null, stallWarnings: Boolean? = null, with: UserStreamWith? = null, replies: UserStreamReplies? = null, follow: List<Long>? = null, vararg options: Pair<String, Any?>) = client.session.get("/1.1/site.json", EndpointHost.SiteStream) {
        parameter("delimited" to delimited, "stall_warning" to stallWarnings, "with" to with?.value, "replies" to replies?.value, "follow" to follow?.joinToString(","), *options)
    }.stream<UserStreamListener, UserStreamHandler>()

    fun sample(delimited: String? = null, stallWarnings: Boolean? = null, vararg options: Pair<String, Any?>) = client.session.get("/1.1/statuses/sample.json", EndpointHost.Stream) {
        parameter("delimited" to delimited, "stall_warning" to stallWarnings, *options)
    }.stream<SampleStreamListener, SampleStreamHandler>()

    fun filter(delimited: String? = null, stallWarnings: Boolean? = null, track: List<String>? = null, follow: List<Long>? = null, locations: Pair<Float, Float>? = null, vararg options: Pair<String, Any?>) = client.session.get("/1.1/statuses/filter.json", EndpointHost.Stream) {
        parameter("delimited" to delimited, "stall_warning" to stallWarnings, "track" to track?.joinToString(","), "follow" to follow?.joinToString(","), "locations" to locations?.toList()?.joinToString(","), *options)
    }.stream<FilterStreamListener, FilterStreamHandler>()
}
{'fraction_non_alphanumeric': 0.14334031244966983, 'fraction_numerical': 0.006442261233693026, 'mean_word_length': 5.985376827896513, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 33, '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': '2764881', 'n_tokens_mistral': 1905, 'n_tokens_neox': 1812, 'n_words': 460}