Skip to content
This repository has been archived by the owner on Apr 8, 2020. It is now read-only.

Commit

Permalink
Merge branch 'master' of github.com:giancarlopro/Telebot-TelegramBotAPI
Browse files Browse the repository at this point in the history
  • Loading branch information
h4child committed Mar 2, 2018
2 parents b33f5f7 + bee0f35 commit c6e98eb
Show file tree
Hide file tree
Showing 21 changed files with 936 additions and 103 deletions.
Binary file modified docs/_build/doctrees/environment.pickle
Binary file not shown.
Binary file added docs/_build/doctrees/functions.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/index.doctree
Binary file not shown.
Binary file added docs/_build/doctrees/objects.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/starting.doctree
Binary file not shown.
32 changes: 32 additions & 0 deletions docs/_build/html/_sources/functions.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
Funções
=======

Aqui você encontra as funções implementadas pela biblioteca.

Funções exclusivas
------------------

Funções que são implementadas pela biblioteca, mas não pela API do Telegram.

.. c:function:: void framebot_init ()
Essa função é utilizada para iniciar a biblioteca e suas dependencias.
.. c:function:: Bot *framebot (const char *token)
Essa função é chamada para inicializar um objeto do tipo :c:type:`Bot`,
que será usado sempre que for preciso utilizar uma função da API do Telegram.
.. _api-func:
Funções da API
--------------
.. c:function:: User *get_me (const char *token)
Veja em `Telegram API`_
.. _`Telegram API`: https://core.telegram.org/bots/api#getme
Uma função para testar seu `token`.
Requer o parâmetro `token`, e retorna as informações básicas do seu bot em um objeto :c:type:`User`.
24 changes: 9 additions & 15 deletions docs/_build/html/_sources/index.rst.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
.. Framebot documentation master file, created by
sphinx-quickstart on Sat Feb 24 20:48:01 2018.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Framebot - Documentação
=======================

Welcome to Framebot's documentation!
====================================
`Framebot` é um framework escrito C com o objetivo de ajudar programadores a criarem chat bots
para o `Telegram`_.

.. _`Telegram`: https://core.telegram.org/bots/api

.. toctree::
:maxdepth: 2
:caption: Contents:
:caption: Conteúdo:

starting


Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
objects
functions
44 changes: 44 additions & 0 deletions docs/_build/html/_sources/objects.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
Objetos
=======

Aqui você encontra os objetos implementados pela biblioteca.

Objetos exclusivos
------------------

Objetos que existem somente na biblioteca, e não possuem representação na API do Telegram.

.. c:type:: Bot
Objeto que vai ser utilizado para referenciar seu bot nas funções da API.

.. c:member:: char *token
Seu `token` do Telegram.

.. c:member:: User *user
Objeto retornado da chamada à :c:func:`get_me`

Objetos da API
--------------

.. c:type:: User
Veja `Telegram User`_

.. _`Telegram User`: https://core.telegram.org/bots/api#user

.. c:member:: long int id
.. c:member:: bool is_bot
.. c:member:: char *first_name
.. c:member:: char *last_name
.. c:member:: char *username
.. c:member:: char *language_code
.. c:member:: struct _user *next
43 changes: 32 additions & 11 deletions docs/_build/html/_sources/starting.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,37 @@ Instalação
----------

Para instalar a biblioteca você deve primeiro clonar o nosso repositório:
``$ git clone https://github.com/giancarlopro/framebot``

.. code-block:: shell
git clone https://github.com/giancarlopro/framebot
Agora você vai precisar ter o `cmake` instalado, e algumas libs:
``$ sudo apt install cmake openssl curl jansson``

.. code-block:: shell
sudo apt install cmake openssl curl jansson
Após isso entre na pasta onde a biblioteca foi clonada, por padrão vai ser `framebot`:
``$ cd framebot``

.. code-block:: shell
cd framebot
Agora crie uma pasta para compilar a biblioteca e rode o cmake para criar o makefile:
``$ mkdir build``

``$ cd build``
.. code-block:: shell
``$ cmake ..``
mkdir build
cd build
cmake ..``
Agora utilize o makefile para compilar e instalar a biblioteca:
``$ make``

``$ make install``
.. code-block:: shell
make
make install
Configuração
------------
Expand All @@ -34,16 +46,25 @@ Para utilizar a biblioteca em seus projetos, você deve informar ao compilador e
as bibliotecas que serão compiladas juntas.

* Se estiver compilando pelo terminal:
``$ gcc projeto.c -o out -lcurl -ljansson -lframebot``

.. code-block:: shell
gcc projeto.c -o out -lcurl -ljansson -lframebot
* Se estiver utilizando o cmake basta informar no seu CMakeLists.txt, em target_link_libraries:
``target_link_libraries(seuexecutavel framebot)``

.. code-block:: shell
target_link_libraries(seuexecutavel framebot)
Utilização
----------

Para utilizar a biblioteca em seus projetos, você deve incluir o arquivo `framebot.h`.
``#include <framebot/framebot.h>``

.. code-block:: c
#include <framebot/framebot.h>
Exemplos
--------
Expand Down

0 comments on commit c6e98eb

Please sign in to comment.