diff --git a/Sources/TelegramBot/Toolbox/TelegramSendApi+HTTPInitializer.swift b/Sources/TelegramBot/Toolbox/TelegramSendApi+HTTPInitializer.swift index a551f9f..5da15ea 100644 --- a/Sources/TelegramBot/Toolbox/TelegramSendApi+HTTPInitializer.swift +++ b/Sources/TelegramBot/Toolbox/TelegramSendApi+HTTPInitializer.swift @@ -15,7 +15,7 @@ public extension TelegramSendApi { * * - parameter token: The telegram bot token to be used in requests. */ - public convenience init(token: String) { + convenience init(token: String) { let provider = TelegramApiHttpProvider(url: "https://api.telegram.org/bot\(token)") self.init(token: token, provider: provider) } diff --git a/Sources/TelegramBotPromiseKit/TelegramSendApi+PromiseKit.swift b/Sources/TelegramBotPromiseKit/TelegramSendApi+PromiseKit.swift index 1f89ba3..a6d3771 100644 --- a/Sources/TelegramBotPromiseKit/TelegramSendApi+PromiseKit.swift +++ b/Sources/TelegramBotPromiseKit/TelegramSendApi+PromiseKit.swift @@ -4,7 +4,7 @@ import PromiseKit public extension TelegramSendApi { - public func getMe() -> Promise { + func getMe() -> Promise { return Promise { seal in self.getMe { response in response.sealPromise(seal: seal) @@ -12,7 +12,7 @@ public extension TelegramSendApi { } } - public func sendMessage(message: TelegramSendMessage) -> Promise { + func sendMessage(message: TelegramSendMessage) -> Promise { return Promise { seal in self.sendMessage(message: message) { response in response.sealPromise(seal: seal) @@ -20,7 +20,7 @@ public extension TelegramSendApi { } } - public func forwardMessage(message: TelegramSendForwardMessage) -> Promise { + func forwardMessage(message: TelegramSendForwardMessage) -> Promise { return Promise { seal in self.forwardMessage(message: message) { response in response.sealPromise(seal: seal) @@ -28,7 +28,7 @@ public extension TelegramSendApi { } } - public func sendPhoto(photo: TelegramSendPhoto) -> Promise { + func sendPhoto(photo: TelegramSendPhoto) -> Promise { return Promise { seal in self.sendPhoto(photo: photo) { response in response.sealPromise(seal: seal) @@ -36,7 +36,7 @@ public extension TelegramSendApi { } } - public func getFile(fileId: String) -> Promise { + func getFile(fileId: String) -> Promise { return Promise { seal in self.getFile(fileId: fileId) { response in response.sealPromise(seal: seal) @@ -44,7 +44,7 @@ public extension TelegramSendApi { } } - public func answerCallbackQuery(answerCallbackQuery: TelegramSendAnswerCallbackQuery) -> Promise { + func answerCallbackQuery(answerCallbackQuery: TelegramSendAnswerCallbackQuery) -> Promise { return Promise { seal in self.answerCallbackQuery(answerCallbackQuery: answerCallbackQuery) { response in response.sealPromise(seal: seal) @@ -52,7 +52,7 @@ public extension TelegramSendApi { } } - public func editMessageReplyMarkup(editMessageReplyMarkup: TelegramSendEditMessageReplyMarkup) -> Promise { + func editMessageReplyMarkup(editMessageReplyMarkup: TelegramSendEditMessageReplyMarkup) -> Promise { return Promise { seal in self.editMessageReplyMarkup(editMessageReplyMarkup: editMessageReplyMarkup) { response in response.sealPromise(seal: seal) @@ -60,7 +60,7 @@ public extension TelegramSendApi { } } - public func getChatMember(chatId: TelegramSendChatIdentifier, userId: Int) -> Promise { + func getChatMember(chatId: TelegramSendChatIdentifier, userId: Int) -> Promise { return Promise { seal in self.getChatMember(chatId: chatId, userId: userId) { response in response.sealPromise(seal: seal) @@ -68,7 +68,7 @@ public extension TelegramSendApi { } } - public func deleteMessage(chatId: TelegramSendChatIdentifier, messageId: Int) -> Promise { + func deleteMessage(chatId: TelegramSendChatIdentifier, messageId: Int) -> Promise { return Promise { seal in self.deleteMessage(chatId: chatId, messageId: messageId) { response in response.sealPromise(seal: seal) @@ -79,7 +79,7 @@ public extension TelegramSendApi { fileprivate extension TelegramResponse { - fileprivate func sealPromise(seal: Resolver) { + func sealPromise(seal: Resolver) { seal.resolve(result, error) } }