Skip to content

Commit

Permalink
Update documents
Browse files Browse the repository at this point in the history
  • Loading branch information
realbardia committed Jul 8, 2018
1 parent 6ec0ba3 commit 4d5de89
Show file tree
Hide file tree
Showing 39 changed files with 1,230 additions and 49 deletions.
6 changes: 4 additions & 2 deletions documents/functions/channels.md
Expand Up @@ -40,8 +40,6 @@

* **Invite to channel** - [TelegramCore::channelsInviteToChannel](methods/invitetochannel.md)

* **Kick from channel** - [TelegramCore::channelsKickFromChannel](methods/kickfromchannel.md)

* **Export invite** - [TelegramCore::channelsExportInvite](methods/exportinvite.md)

* **Delete channel** - [TelegramCore::channelsDeleteChannel](methods/deletechannel.md)
Expand All @@ -56,3 +54,7 @@

* **Get admined public channels** - [TelegramCore::channelsGetAdminedPublicChannels](methods/getadminedpublicchannels.md)

* **Edit banned** - [TelegramCore::channelsEditBanned](methods/editbanned.md)

* **Get admin log** - [TelegramCore::channelsGetAdminLog](methods/getadminlog.md)

4 changes: 4 additions & 0 deletions documents/functions/index.md
Expand Up @@ -12,6 +12,8 @@

* [Help](help.md)

* [Langpack](langpack.md)

* [Messages](messages.md)

* [Payments](payments.md)
Expand All @@ -20,6 +22,8 @@

* [Photos](photos.md)

* [Stickers](stickers.md)

* [Updates](updates.md)

* [Upload](upload.md)
Expand Down
12 changes: 12 additions & 0 deletions documents/functions/langpack.md
@@ -0,0 +1,12 @@
# Langpack

## Methods:

* **Get lang pack** - [TelegramCore::langpackGetLangPack](methods/getlangpack.md)

* **Get strings** - [TelegramCore::langpackGetStrings](methods/getstrings.md)

* **Get difference** - [TelegramCore::langpackGetDifference](methods/getdifference.md)

* **Get languages** - [TelegramCore::langpackGetLanguages](methods/getlanguages.md)

2 changes: 2 additions & 0 deletions documents/functions/messages.md
Expand Up @@ -172,3 +172,5 @@

* **Set bot precheckout results** - [TelegramCore::messagesSetBotPrecheckoutResults](methods/setbotprecheckoutresults.md)

* **Upload media** - [TelegramCore::messagesUploadMedia](methods/uploadmedia.md)

57 changes: 57 additions & 0 deletions documents/functions/methods/addstickertoset.md
@@ -0,0 +1,57 @@
# Stickers.addStickerToSet

## Function:

TelegramCore::stickersAddStickerToSet

## Schema:

```c++
stickers.addStickerToSet#8653febe stickerset:InputStickerSet sticker:InputStickerSetItem = messages.StickerSet;
```
## Parameters:

|Name|Type|Default|
|----|----|-------|
|stickerset|[InputStickerSet](../../types/inputstickerset.md)||
|sticker|[InputStickerSetItem](../../types/inputstickersetitem.md)||
|callBack|Callback<[MessagesStickerSet](../../types/messagesstickerset.md)>|0|
|timeout|qint32|TelegramCore::timeOut()|

## Callback Result:

|Name|Type|
|----|----|
|msgId|qint64|
|result|[MessagesStickerSet](../../types/messagesstickerset.md)|
|error|TelegramCore::CallbackError|

## Signals:

```c++
addStickerToSetAnswer(qint64 msgId, const MessagesStickerSet & result)
```
```c++
addStickerToSetError(qint64 msgId, qint32 errorCode, const QString &errorText)
```

## Events:

```c++
onAddStickerToSetAnswer(qint64 msgId, const MessagesStickerSet & result)
```
```c++
onAddStickerToSetError(qint64 msgId, qint32 errorCode, const QString &errorText)
```

## Macros:

* TG_ADD_STICKER_TO_SET_CALLBACK

## Examples:

```c++
tg->addStickerToSet(stickerset, sticker, [=](TG_ADD_STICKER_TO_SET_CALLBACK){
...
}, 30000);
```
57 changes: 57 additions & 0 deletions documents/functions/methods/changestickerposition.md
@@ -0,0 +1,57 @@
# Stickers.changeStickerPosition

## Function:

TelegramCore::stickersChangeStickerPosition

## Schema:

```c++
stickers.changeStickerPosition#4ed705ca sticker:InputDocument position:int = Bool;
```
## Parameters:

|Name|Type|Default|
|----|----|-------|
|sticker|[InputDocument](../../types/inputdocument.md)||
|position|qint32||
|callBack|Callback<bool>|0|
|timeout|qint32|TelegramCore::timeOut()|

## Callback Result:

|Name|Type|
|----|----|
|msgId|qint64|
|result|bool|
|error|TelegramCore::CallbackError|

## Signals:

```c++
changeStickerPositionAnswer(qint64 msgId, bool result)
```
```c++
changeStickerPositionError(qint64 msgId, qint32 errorCode, const QString &errorText)
```

## Events:

```c++
onChangeStickerPositionAnswer(qint64 msgId, bool result)
```
```c++
onChangeStickerPositionError(qint64 msgId, qint32 errorCode, const QString &errorText)
```

## Macros:

* TG_CHANGE_STICKER_POSITION_CALLBACK

## Examples:

```c++
tg->changeStickerPosition(sticker, position, [=](TG_CHANGE_STICKER_POSITION_CALLBACK){
...
}, 30000);
```
60 changes: 60 additions & 0 deletions documents/functions/methods/createstickerset.md
@@ -0,0 +1,60 @@
# Stickers.createStickerSet

## Function:

TelegramCore::stickersCreateStickerSet

## Schema:

```c++
stickers.createStickerSet#9bd86e6a flags:# masks:flags.0?true user_id:InputUser title:string short_name:string stickers:Vector<InputStickerSetItem> = messages.StickerSet;
```
## Parameters:

|Name|Type|Default|
|----|----|-------|
|masks|bool||
|userId|[InputUser](../../types/inputuser.md)||
|title|QString||
|shortName|QString||
|stickers|QList&lt;[InputStickerSetItem](../../types/inputstickersetitem.md)&gt;||
|callBack|Callback&lt;[MessagesStickerSet](../../types/messagesstickerset.md)&gt;|0|
|timeout|qint32|TelegramCore::timeOut()|

## Callback Result:

|Name|Type|
|----|----|
|msgId|qint64|
|result|[MessagesStickerSet](../../types/messagesstickerset.md)|
|error|TelegramCore::CallbackError|

## Signals:

```c++
createStickerSetAnswer(qint64 msgId, const MessagesStickerSet & result)
```
```c++
createStickerSetError(qint64 msgId, qint32 errorCode, const QString &errorText)
```

## Events:

```c++
onCreateStickerSetAnswer(qint64 msgId, const MessagesStickerSet & result)
```
```c++
onCreateStickerSetError(qint64 msgId, qint32 errorCode, const QString &errorText)
```

## Macros:

* TG_CREATE_STICKER_SET_CALLBACK

## Examples:

```c++
tg->createStickerSet(masks, user_id, title, short_name, stickers, [=](TG_CREATE_STICKER_SET_CALLBACK){
...
}, 30000);
```
6 changes: 3 additions & 3 deletions documents/functions/methods/editadmin.md
Expand Up @@ -7,15 +7,15 @@ TelegramCore::channelsEditAdmin
## Schema:

```c++
channels.editAdmin#eb7611d0 channel:InputChannel user_id:InputUser role:ChannelParticipantRole = Updates;
channels.editAdmin#20b88214 channel:InputChannel user_id:InputUser admin_rights:ChannelAdminRights = Updates;
```
## Parameters:

|Name|Type|Default|
|----|----|-------|
|channel|[InputChannel](../../types/inputchannel.md)||
|userId|[InputUser](../../types/inputuser.md)||
|role|[ChannelParticipantRole](../../types/channelparticipantrole.md)||
|adminRights|[ChannelAdminRights](../../types/channeladminrights.md)||
|callBack|Callback&lt;[UpdatesType](../../types/updatestype.md)&gt;|0|
|timeout|qint32|TelegramCore::timeOut()|

Expand Down Expand Up @@ -52,7 +52,7 @@ onEditAdminError(qint64 msgId, qint32 errorCode, const QString &errorText)
## Examples:

```c++
tg->editAdmin(channel, user_id, role, [=](TG_EDIT_ADMIN_CALLBACK){
tg->editAdmin(channel, user_id, admin_rights, [=](TG_EDIT_ADMIN_CALLBACK){
...
}, 30000);
```
58 changes: 58 additions & 0 deletions documents/functions/methods/editbanned.md
@@ -0,0 +1,58 @@
# Channels.editBanned

## Function:

TelegramCore::channelsEditBanned

## Schema:

```c++
channels.editBanned#bfd915cd channel:InputChannel user_id:InputUser banned_rights:ChannelBannedRights = Updates;
```
## Parameters:

|Name|Type|Default|
|----|----|-------|
|channel|[InputChannel](../../types/inputchannel.md)||
|userId|[InputUser](../../types/inputuser.md)||
|bannedRights|[ChannelBannedRights](../../types/channelbannedrights.md)||
|callBack|Callback&lt;[UpdatesType](../../types/updatestype.md)&gt;|0|
|timeout|qint32|TelegramCore::timeOut()|

## Callback Result:

|Name|Type|
|----|----|
|msgId|qint64|
|result|[UpdatesType](../../types/updatestype.md)|
|error|TelegramCore::CallbackError|

## Signals:

```c++
editBannedAnswer(qint64 msgId, const UpdatesType & result)
```
```c++
editBannedError(qint64 msgId, qint32 errorCode, const QString &errorText)
```

## Events:

```c++
onEditBannedAnswer(qint64 msgId, const UpdatesType & result)
```
```c++
onEditBannedError(qint64 msgId, qint32 errorCode, const QString &errorText)
```

## Macros:

* TG_EDIT_BANNED_CALLBACK

## Examples:

```c++
tg->editBanned(channel, user_id, banned_rights, [=](TG_EDIT_BANNED_CALLBACK){
...
}, 30000);
```
62 changes: 62 additions & 0 deletions documents/functions/methods/getadminlog.md
@@ -0,0 +1,62 @@
# Channels.getAdminLog

## Function:

TelegramCore::channelsGetAdminLog

## Schema:

```c++
channels.getAdminLog#33ddf480 flags:# channel:InputChannel q:string events_filter:flags.0?ChannelAdminLogEventsFilter admins:flags.1?Vector<InputUser> max_id:long min_id:long limit:int = channels.AdminLogResults;
```
## Parameters:

|Name|Type|Default|
|----|----|-------|
|channel|[InputChannel](../../types/inputchannel.md)||
|q|QString||
|eventsFilter|[ChannelAdminLogEventsFilter](../../types/channeladminlogeventsfilter.md)||
|admins|QList&lt;[InputUser](../../types/inputuser.md)&gt;||
|maxId|qint64||
|minId|qint64||
|limit|qint32||
|callBack|Callback&lt;[ChannelsAdminLogResults](../../types/channelsadminlogresults.md)&gt;|0|
|timeout|qint32|TelegramCore::timeOut()|

## Callback Result:

|Name|Type|
|----|----|
|msgId|qint64|
|result|[ChannelsAdminLogResults](../../types/channelsadminlogresults.md)|
|error|TelegramCore::CallbackError|

## Signals:

```c++
getAdminLogAnswer(qint64 msgId, const ChannelsAdminLogResults & result)
```
```c++
getAdminLogError(qint64 msgId, qint32 errorCode, const QString &errorText)
```

## Events:

```c++
onGetAdminLogAnswer(qint64 msgId, const ChannelsAdminLogResults & result)
```
```c++
onGetAdminLogError(qint64 msgId, qint32 errorCode, const QString &errorText)
```

## Macros:

* TG_GET_ADMIN_LOG_CALLBACK

## Examples:

```c++
tg->getAdminLog(channel, q, events_filter, admins, max_id, min_id, limit, [=](TG_GET_ADMIN_LOG_CALLBACK){
...
}, 30000);
```

0 comments on commit 4d5de89

Please sign in to comment.