a) Check status of nfsd service:
$ sudo nfsd status
| defmodule TelegramApi do | |
| @base_api_url "https://api.telegram.org/bot" | |
| @headers ["Content-Type": "application/json"] | |
| # Get Telegram Bot info: TelegramApi.get("getMe", access_token) | |
| # Set webhook: TelegramApi.post("setWebhook", access_token, %{url: "https://my-app.example.com/callback"}) | |
| # Remove webhook: TelegramApi.post("setWebhook", access_token, %{url: ""}) | |
| # Send message: TelegramApi.post("sendMessage", access_token, %{chat_id: 123456, text: "Answer From Bot"}) | |
| # Get file: TelegramApi.get("getFile", access_token, %{file_id: "file-id-from-message"}) |
| defmodule ViberApi do | |
| @api_url "https://chatapi.viber.com/pa/" | |
| # Usage examples | |
| # ============== | |
| # | |
| # Get Public Account info | |
| # ----------------------- | |
| # ViberApi.get("get_account_info", token) | |
| # |
| <?xml version="1.0" encoding="utf-8"?> | |
| <yml_catalog date="2016-10-20 11:25"> | |
| <shop> | |
| <categories> | |
| <category id="1">Category 1</category> | |
| <category id="2" parentId="1">Subcategory 1</category> | |
| ... | |
| </categories> | |
| <offers> | |
| <offer id="1" available="true"> |
| /* | |
| * Convead catch user info code samples. | |
| * Requires jQuery. | |
| */ | |
| // Catch email from field with ID 'user_email' on blur | |
| $('#user_email').blur(function(e) { | |
| var email_regexp = /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,6}$/i; | |
| var email = $(this).val(); | |
| if ((typeof convead !== 'undefined') && (email_regexp.test(email))) { |
| <!-- CART BEGINS HERE --> | |
| <table cellpadding="0" cellspacing="0" style="margin: 15px 0; font-size: 15px; line-height: 1.3em;" width="100%"> | |
| <tr> | |
| <td colspan="5" style="padding: 0 0 10px 0;"> | |
| <h4 style="font-size: 22px; line-height: 1.2em; font-weight: 400; margin: 0; padding: 4px 0;">Ваша корзина</h4> | |
| </td> | |
| </tr> | |
| {% for line_item in cart.line_items %} | |
| <tr> | |
| <td colspan="5" style="border-top: 1px solid #e0e0e0;"></td> |