<commit_before>//
//  EndpointInfo.swift
//  Sword
//
//  Created by <NAME>
//  Copyright © 2017 <NAME>. All rights reserved.
//

typealias EndpointInfo = (url: String, method: HTTPMethod)

extension Endpoint {

  var httpInfo: EndpointInfo {
    switch self {

      case .gateway:
        return ("/gateway/bot", .get)

      case let .addPinnedChannelMessage(channel, message):
        return ("/channels/\(channel)/pins/\(message)", .post)

      case let .beginGuildPrune(guild):
        return ("/guilds/\(guild)/prune", .post)

      case let .bulkDeleteMessages(channel):
        return ("/channels/\(channel)/messages/bulk-delete", .post)

      case let .createChannelInvite(channel):
        return ("/channels/\(channel)/invites", .post)

      case .createDM:
        return ("/users/@me/channels", .post)

      case .createGuild:
        return ("/guilds", .post)

      case let .createGuildBan(guild, user):
        return ("/guilds/\(guild)/members/\(user)", .put)

      case let .createGuildChannel(guild):
        return ("/guilds/\(guild)/channels", .post)

      case let .createGuildIntegration(guild):
        return ("/guilds/\(guild)/integrations", .post)

      case let .createGuildRole(guild):
        return ("/guilds/\(guild)/roles", .post)

      case let .createMessage(channel):
        return ("/channels/\(channel)/message", .post)

      case let .createReaction(channel, message, reaction):
        return ("/channels/\(channel)/messages/\(message)/reactions/\(reaction)/@me", .put)

      case let .createWebhook(channel):<commit_msg>Fix 404 on create message<commit_after>//
//  EndpointInfo.swift
//  Sword
//
//  Created by <NAME>
//  Copyright © 2017 <NAME>. All rights reserved.
//

typealias EndpointInfo = (url: String, method: HTTPMethod)

extension Endpoint {

  var httpInfo: EndpointInfo {
    switch self {

      case .gateway:
        return ("/gateway/bot", .get)

      case let .addPinnedChannelMessage(channel, message):
        return ("/channels/\(channel)/pins/\(message)", .post)

      case let .beginGuildPrune(guild):
        return ("/guilds/\(guild)/prune", .post)

      case let .bulkDeleteMessages(channel):
        return ("/channels/\(channel)/messages/bulk-delete", .post)

      case let .createChannelInvite(channel):
        return ("/channels/\(channel)/invites", .post)

      case .createDM:
        return ("/users/@me/channels", .post)

      case .createGuild:
        return ("/guilds", .post)

      case let .createGuildBan(guild, user):
        return ("/guilds/\(guild)/members/\(user)", .put)

      case let .createGuildChannel(guild):
        return ("/guilds/\(guild)/channels", .post)

      case let .createGuildIntegration(guild):
        return ("/guilds/\(guild)/integrations", .post)

      case let .createGuildRole(guild):
        return ("/guilds/\(guild)/roles", .post)

      case let .createMessage(channel):
        return ("/channels/\(channel)/messages", .post)

      case let .createReaction(channel, message, reaction):
        return ("/channels/\(channel)/messages/\(message)/reactions/\(reaction)/@me", .put)

      case let .createWebhook(channel):
{'fraction_non_alphanumeric': 0.16134134767478647, 'fraction_numerical': 0.0034799114204365706, 'mean_word_length': 2.6219931271477663, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '5883816', 'n_tokens_mistral': 1022, 'n_tokens_neox': 968, 'n_words': 219}