{"id":13507560,"url":"https://github.com/Yawolf/yocingo","last_synced_at":"2025-03-30T09:32:57.578Z","repository":{"id":35668821,"uuid":"39944086","full_name":"Yawolf/yocingo","owner":"Yawolf","description":null,"archived":false,"fork":false,"pushed_at":"2017-03-26T10:58:32.000Z","size":69,"stargazers_count":39,"open_issues_count":2,"forks_count":10,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-01T07:33:12.250Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Yawolf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-30T10:06:41.000Z","updated_at":"2022-12-03T09:50:14.000Z","dependencies_parsed_at":"2022-09-03T15:12:29.695Z","dependency_job_id":null,"html_url":"https://github.com/Yawolf/yocingo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yawolf%2Fyocingo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yawolf%2Fyocingo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yawolf%2Fyocingo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yawolf%2Fyocingo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Yawolf","download_url":"https://codeload.github.com/Yawolf/yocingo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246301963,"owners_count":20755512,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T02:00:36.140Z","updated_at":"2025-03-30T09:32:57.278Z","avatar_url":"https://github.com/Yawolf.png","language":"Elixir","funding_links":[],"categories":["Chatting"],"sub_categories":[],"readme":"![](http://s13.postimg.org/7vkml9zwn/yocingo_Icon.png)\n\n\nYocingo Telegram API Bot\n========================\n\nA Telegram API Bot written in **Elixir**! Awesome! :D ([Hex](https://hex.pm/packages/yocingo)) ([Documentation](http://hexdocs.pm/yocingo/0.0.1/))\n\nThe libary is completed!! Yay! And it is accesible in the Hex repository! ^_^\n\n## ADVERTISEMENT: I will upgrade this API as soon as I have time. \nThis Wrapper was created before Telegram API 2.0, anyway, can still be used.\nThank you :D\n\n## Disclaimer\nThis is my first Elixir program, so please, don't be hard with me, I'm just a poor\nboy who loves learn new things :D\n\nEvery comment or suggestion is welcome!\n\n## Install\nUse Mix to install this module, add:\n\n```elixir\ndefp deps do\n    [{:yocingo, \"\u003e= 0.0.1\"}]\nend\n```\nIn your mix.exs deps function and then type:\n\n```\n$ mix deps.get\n```\nAnd finally add yocingo as an application dependency:\n\n```elixir\ndefp application do\n    [applications: [:yocingo]]\nend\n```\nAnd done! You can use Yocingo in your project :D\n\n## How it Works?\nWell this is a complete implementation of the Telegram Bot API in Elixir, and it\nis really easy to use the functions.\n\n### get_me\nA simple method for testing your bot's auth token. \nRequires no parameters. \nReturns basic information about the bot in form of a HashMap.\n\nExample:\n\n```elixir\niex\u003e Yocingo.get_me\n%{\"ok\" =\u003e true,\n\"result\" =\u003e %{\"first_name\" =\u003e \"RaggerBot\", \"id\" =\u003e 93294942,\n\"username\" =\u003e \"RaggerBot\"}}\n```\n\n### get_updates\nUse this method to receive incoming updates using long polling.\nReturns the updates in form of a HashMap\n\n**Arguments**\n\nName | Type | Required | Description\n-----|------|----------|-------------\noffset | Integer | Optional | Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates. By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon as getUpdates is called with an offset higher than its update_id.\nlimits | Integer | Optional | Limits the number of updates to be retrieved. Values between 1—100 are accepted. Defaults to 100\ntimeout | Integer | Optional | Timeout in seconds for long polling. Defaults to 0, i.e. usual short polling\n\nExample:\n\n```elixir\niex\u003e Yocingo.get_updates 965421280\n%{\"ok\" =\u003e true,\n\"result\" =\u003e [%{\"message\" =\u003e %{\"chat\" =\u003e %{\"first_name\" =\u003e \"Yago\",\n\"id\" =\u003e 8026522, \"last_name\" =\u003e \"Wolf\", \"username\" =\u003e \"ygwolf\"},\n\"date\" =\u003e 1438340483,\n\"from\" =\u003e %{\"first_name\" =\u003e \"Yago\", \"id\" =\u003e 8026522,\n\"last_name\" =\u003e \"Wolf\", \"username\" =\u003e \"ygwolf\"}, \"message_id\" =\u003e 53,\n\"text\" =\u003e \"a\"}, \"update_id\" =\u003e 965421280}]}\n```\n\n\n### send_message\nUse this method to send text messages.\nRetruns information in form of a HashMap.\n\n**Arguments**\n\nName | Type | Required | Description\n-----|------|----------|-------------\nchat_id | Integer | Yes | Unique identifier for the message recipient, user or group.\ntext | String | Yes | Text of the message to be sent.\ndisable_web_page_preview | Boolean | Optional | Disables link previews for links in this message.\nreply_to_message_id | Integer | Optional | If the message is a reply, ID of the original message.\nreply_markup | Dict of List of List | Optional | Additional interface options. A JSON-serialized object for a custom reply keyboard, instructions to hide keyboard or to force a reply from the user. (Check Telegram API for more Information).\n\nExample:\n\n```elixir\niex\u003e Yocingo.send_message 8026522, \"Hi there! How are you doing?\"\n%{\"ok\" =\u003e true,\n\"result\" =\u003e %{\"chat\" =\u003e %{\"first_name\" =\u003e \"Yago\", \"id\" =\u003e 8026522,\n\"last_name\" =\u003e \"Wolf\", \"username\" =\u003e \"ygwolf\"}, \"date\" =\u003e 1438343887,\n\"from\" =\u003e %{\"first_name\" =\u003e \"RaggerBot\", \"id\" =\u003e 93294942,\n\"username\" =\u003e \"RaggerBot\"}, \"message_id\" =\u003e 57,\n\"text\" =\u003e \"Hi there! How are you doing?\"}}\n```\n\n### send_photo\nUse this method to send photos.\nReturns info in form of a HashMap\n\n**Arguments**\n\nName | Type | Required | Description\n-----|------|----------|-------------\nchat_id | Integer | Yes | Unique identifier for the message recipient, user or group.\nphoto | File or String | Yes | Photo to send. You can either pass a file_id as String to resend a photo that is already on the Telegram servers, or upload a new photo using multipart/form-data.\ncaption | String | Optional | Photo caption (may also be used when resending photos by file_id).\nreply_to_message_id | Integer | Optional | If the message is a reply, ID of the original message.\nreply_markup | Dict of List of List | Optional, Additional interface options. A JSON-serialized object for a custom reply keyboard, instructions to hide keyboard or to force a reply from the user. (Check Telegram API for more Information).\n\nExample:\n\n```elixir\niex\u003e Yocingo.send_photo 8026522, \"yocingoIcon.png\"\n%{\"ok\" =\u003e true,\n\"result\" =\u003e %{\"chat\" =\u003e %{\"first_name\" =\u003e \"Yago\", \"id\" =\u003e 8026522,\n\"last_name\" =\u003e \"Wolf\", \"username\" =\u003e \"ygwolf\"}, \"date\" =\u003e 1438344612,\n\"from\" =\u003e %{\"first_name\" =\u003e \"RaggerBot\", \"id\" =\u003e 93294942,\n\"username\" =\u003e \"RaggerBot\"}, \"message_id\" =\u003e 58,\n\"photo\" =\u003e [%{\"file_id\" =\u003e \"AgADBAADq6cxG16RjwWKV2xn40AI6l4NUTAABAKa55-TYmeR6tcBAAEC\",\n\"file_size\" =\u003e 1415, \"height\" =\u003e 90, \"width\" =\u003e 57},\n%{\"file_id\" =\u003e \"AgADBAADq6cxG16RjwWKV2xn40AI6l4NUTAABJDV8MqvvYi66dcBAAEC\",\n\"file_size\" =\u003e 6928, \"height\" =\u003e 245, \"width\" =\u003e 156}]}}\n```\n\n### send_audio\nUse this method to send audio files.\nReturns info in form of a HashMap\n\n**Arguments**\n\nName | Type | Required | Description\n-----|------|----------|-------------\nchat_id | Integer | Yes | Unique identifier for the message recipient, user or group.\naudio | File or String | Yes | Audio file to send. You can either pass a file_id as String to resend a audio file that is already on the Telegram servers, or upload a new photo using multipart/form-data.\nduration | Integer | Optional | Duration of sent audio in seconds\nreply_to_message_id | Integer | Optional | If the message is a reply, ID of the original message.\nreply_markup | Dict of List of List | Optional | Additional interface options. A JSON-serialized object for a custom reply keyboard, instructions to hide keyboard or to force a reply from the user. (Check Telegram API for more Information).\n\nExample:\n\n```elixir\niex\u003e Yocingo.send_audio 8026522, \"example.ogg\"\n%{\"ok\" =\u003e true,\n\"result\" =\u003e %{\"audio\" =\u003e %{\"duration\" =\u003e 0,\n\"file_id\" =\u003e \"AwADBAADBgADXpGPBfhLd55LsVpQAg\", \"file_size\" =\u003e 105243,\n\"mime_type\" =\u003e \"audio/ogg\"},\n\"chat\" =\u003e %{\"first_name\" =\u003e \"Yago\", \"id\" =\u003e 8026522, \"last_name\" =\u003e \"Wolf\",\n\"username\" =\u003e \"ygwolf\"}, \"date\" =\u003e 1438344843,\n\"from\" =\u003e %{\"first_name\" =\u003e \"RaggerBot\", \"id\" =\u003e 93294942,\n\"username\" =\u003e \"RaggerBot\"}, \"message_id\" =\u003e 59}}\n```\n\n### send_document\nUse this method to send documents.\nReturns info in form of a HashMap\n\n**Arguments**\n\nName | Type | Required | Description\n-----|------|----------|-------------\nchat_id | Integer | Yes | Unique identifier for the message recipient, user or group.\nsticker | File or String | Yes | Sticker to send. You can either pass a file_id as String to resend a sticker that is already on the Telegram servers, or upload a new photo using multipart/form-data.\nreply_to_message_id | Integer | Optional | If the message is a reply, ID of the original message.\nreply_markup | Dict of List of List | Optional | Additional interface options. A JSON-serialized object for a custom reply keyboard, instructions to hide keyboard or to force a reply from the user. (Check Telegram API for more Information).\n\nExample:\n\n```elixir\niex\u003e Yocingo.send_document 8026522, \".gitignore\"\n%{\"ok\" =\u003e true,\n\"result\" =\u003e %{\"chat\" =\u003e %{\"first_name\" =\u003e \"Yago\", \"id\" =\u003e 8026522,\n\"last_name\" =\u003e \"Wolf\", \"username\" =\u003e \"ygwolf\"}, \"date\" =\u003e 1438345187,\n\"document\" =\u003e %{\"file_id\" =\u003e \"BQADBAADBwADXpGPBcyn2H9KLwekAg\",\n\"file_name\" =\u003e \".gitignore\", \"file_size\" =\u003e 84},\n\"from\" =\u003e %{\"first_name\" =\u003e \"RaggerBot\", \"id\" =\u003e 93294942,\n\"username\" =\u003e \"RaggerBot\"}, \"message_id\" =\u003e 60}}\n```\n\n### send_sticker\nUse this method to send documents.\nReturns info in form of a HashMap\n\n**Arguments**\n\nName | Type | Required | Description\n-----|------|----------|-------------\nchat_id | Integer | Yes | Unique identifier for the message recipient, user or group.\nsticker | File or String | Yes | Sticker to send. You can either pass a file_id as String to resend a sticker that is already on the Telegram servers, or upload a new photo using multipart/form-data.\nreply_to_message_id | Integer | Optional | If the message is a reply, ID of the original message.\nreply_markup | Dict of List of List | Optional | Additional interface options. A JSON-serialized object for a custom reply keyboard, instructions to hide keyboard or to force a reply from the user. (Check Telegram API for more Information).\n\nExample:\n\n```elixir\niex\u003e Yocingo.send_sticker 8026522, \"BQADBAADgwADXOgKAAF8NJdrPGQ5agI\"\n%{\"ok\" =\u003e true,\n\"result\" =\u003e %{\"chat\" =\u003e %{\"first_name\" =\u003e \"Yago\", \"id\" =\u003e 8026522,\n\"last_name\" =\u003e \"Wolf\", \"username\" =\u003e \"ygwolf\"}, \"date\" =\u003e 1438345343,\n\"from\" =\u003e %{\"first_name\" =\u003e \"RaggerBot\", \"id\" =\u003e 93294942,\n\"username\" =\u003e \"RaggerBot\"}, \"message_id\" =\u003e 62,\n\"sticker\" =\u003e %{\"file_id\" =\u003e \"BQADBAADgwADXOgKAAF8NJdrPGQ5agI\",\n\"file_size\" =\u003e 27954, \"height\" =\u003e 512,\n\"thumb\" =\u003e %{\"file_id\" =\u003e \"AAQEABP-lGEwAAR35Im92KU34gYrAAIC\",\n\"file_size\" =\u003e 5542, \"height\" =\u003e 128, \"width\" =\u003e 109}, \"width\" =\u003e 436}}}\n```\n\n### send_video\nUse this method to send videos.\nReturns info in form of a HashMap\n\n**Arguments**\n\nName | Type | Required | Description\n-----|------|----------|-------------\nchat_id | Integer | Yes | Unique identifier for the message recipient, user or group.\nvideo | File or String | Yes, Video to send. You can either pass a file_id as String to resend a video that is already on the Telegram servers, or upload a new photo using multipart/form-data.\nreply_to_message_id | Integer | Optional | If the message is a reply, ID of the original message.\nreply_markup | Dict of List of List | Optional | Additional interface options. A JSON-serialized object for a custom reply keyboard, instructions to hide keyboard or to force a reply from the user. (Check Telegram API for more Information).  \n\nExample:\n\n```elixir\niex\u003e Yocingo.send_sticker 8026522, \"sample.mp4\"\n%{\"ok\" =\u003e true,\n\"result\" =\u003e %{\"chat\" =\u003e %{\"first_name\" =\u003e \"Yago\", \"id\" =\u003e 8026522,\n\"last_name\" =\u003e \"Wolf\", \"username\" =\u003e \"ygwolf\"}, \"date\" =\u003e 1438360135,\n\"from\" =\u003e %{\"first_name\" =\u003e \"RaggerBot\", \"id\" =\u003e 93294942,\n\"username\" =\u003e \"RaggerBot\"}, \"message_id\" =\u003e 63,\n\"sticker\" =\u003e %{\"file_id\" =\u003e \"BQADBAADCAADXpGPBQTGPdRE9IOZAg\",\n\"file_size\" =\u003e 1055736, \"height\" =\u003e 0, \"width\" =\u003e 0}}}\n```\n\n### send_chat_action:\nUse this method when you need to tell the user that something is happening on the \nbot's side. The status is set for 5 seconds or less (when a message arrives from\nyour bot, Telegram clients clear its typing status).\nReturns info in form of a HashMap.\n\n**Arguments**\n\nName | Type | Required | Description\n-----|------|----------|-------------\nchat_id | Integer | Yes | Unique identifier for the message recipient, user or group.\naction | String | Yes | Type of action to broadcast. Choose one, depending on what the user is about to receive: typing for text messages, upload_photo for photos, record_video or upload_video for videos, record_audio or upload_audio for audio files, upload_document for general files, find_location for location data.\n\nExmaple:\n\n```elixir\niex\u003e Yocingo.send_chat_action 8026522, \"typing\"\n%{\"ok\" =\u003e true, \"result\" =\u003e true}\n```\n\n### get_use_profiles_photos:\nUse this method to get a list of profile pictures for a user.\nReturns info in form of a HashMap\n\n**Arguments**\n\nName | Type | Required | Description\n-----|------|----------|-------------\nuser_id | Integer | Yes | Unique identifier of the target user.\noffset | Integer | Optional | Sequential number of the first photo to be returned. By default the value is 0 (means all).\nlimit | Integer | Optional | Limits the number of photos to be retrieved. Values between 1—100 are accepted. Defaults to 100.\n\nExample:\n\n```elixir\niex\u003e Yocingo.get_user_profiles_photos 1\n%{\"ok\" =\u003e true, \"result\" =\u003e %{\"photos\" =\u003e [], \"total_count\" =\u003e 0}}\n```\n\n### send_location\nUse this method to send point on the map.\nReturns info in form of a HashMap.\n\n**Arguments**\n\nName | Type | Required | Description\n-----|------|----------|-------------\nchat_id | Integer | Yes | Unique identifier for the message recipient, user or group.\nlatitude | Float | Yes | Latitude of location.\nlongitude | Float | Yes | Longitude of location.\nreply_to_message_id | Integer | Optional | If the message is a reply, ID of the original message.\nreply_markup | Dict of List of List | Optional | Additional interface options. A JSON-serialized object for a custom reply keyboard, instructions to hide keyboard or to force a reply from the user. (Check Telegram API for more Information).\n\nExample:\n\n```elixir\niex\u003e Yocingo.send_location 8026522, 40.4000, -3.7167\n%{\"ok\" =\u003e true,\n\"result\" =\u003e %{\"chat\" =\u003e %{\"first_name\" =\u003e \"Yago\", \"id\" =\u003e 8026522,\n\"last_name\" =\u003e \"Wolf\", \"username\" =\u003e \"ygwolf\"}, \"date\" =\u003e 1438360680,\n\"from\" =\u003e %{\"first_name\" =\u003e \"RaggerBot\", \"id\" =\u003e 93294942,\n\"username\" =\u003e \"RaggerBot\"},\n\"location\" =\u003e %{\"latitude\" =\u003e 40.400003, \"longitude\" =\u003e -3.716695},\n\"message_id\" =\u003e 64}}\n```\n\nHave you seen? Is really easy to use! :D\n\n## Contact\nUse telegram to talk about Telegram! :D\n[ygwolf](https://telegram.me/ygwolf)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FYawolf%2Fyocingo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FYawolf%2Fyocingo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FYawolf%2Fyocingo/lists"}