mirror of https://github.com/procxx/kepka.git
Update API scheme.
This commit is contained in:
parent
052e4bc508
commit
abf49e1672
|
@ -312,8 +312,6 @@ photoStrippedSize#e0b0bc2e type:string bytes:bytes = PhotoSize;
|
||||||
geoPointEmpty#1117dd5f = GeoPoint;
|
geoPointEmpty#1117dd5f = GeoPoint;
|
||||||
geoPoint#296f104 long:double lat:double access_hash:long = GeoPoint;
|
geoPoint#296f104 long:double lat:double access_hash:long = GeoPoint;
|
||||||
|
|
||||||
auth.checkedPhone#811ea28e phone_registered:Bool = auth.CheckedPhone;
|
|
||||||
|
|
||||||
auth.sentCode#5e002502 flags:# type:auth.SentCodeType phone_code_hash:string next_type:flags.1?auth.CodeType timeout:flags.2?int = auth.SentCode;
|
auth.sentCode#5e002502 flags:# type:auth.SentCodeType phone_code_hash:string next_type:flags.1?auth.CodeType timeout:flags.2?int = auth.SentCode;
|
||||||
|
|
||||||
auth.authorization#cd050916 flags:# tmp_sessions:flags.0?int user:User = auth.Authorization;
|
auth.authorization#cd050916 flags:# tmp_sessions:flags.0?int user:User = auth.Authorization;
|
||||||
|
@ -637,6 +635,7 @@ chatInvite#dfc2f58e flags:# channel:flags.0?true broadcast:flags.1?true public:f
|
||||||
inputStickerSetEmpty#ffb62b95 = InputStickerSet;
|
inputStickerSetEmpty#ffb62b95 = InputStickerSet;
|
||||||
inputStickerSetID#9de7a269 id:long access_hash:long = InputStickerSet;
|
inputStickerSetID#9de7a269 id:long access_hash:long = InputStickerSet;
|
||||||
inputStickerSetShortName#861cc8a0 short_name:string = InputStickerSet;
|
inputStickerSetShortName#861cc8a0 short_name:string = InputStickerSet;
|
||||||
|
inputStickerSetAnimatedEmoji#28703c8 = InputStickerSet;
|
||||||
|
|
||||||
stickerSet#eeb46f27 flags:# archived:flags.1?true official:flags.2?true masks:flags.3?true animated:flags.5?true installed_date:flags.0?int id:long access_hash:long title:string short_name:string thumb:flags.4?PhotoSize thumb_dc_id:flags.4?int count:int hash:int = StickerSet;
|
stickerSet#eeb46f27 flags:# archived:flags.1?true official:flags.2?true masks:flags.3?true animated:flags.5?true installed_date:flags.0?int id:long access_hash:long title:string short_name:string thumb:flags.4?PhotoSize thumb_dc_id:flags.4?int count:int hash:int = StickerSet;
|
||||||
|
|
||||||
|
@ -1145,7 +1144,7 @@ inputWallPaperSlug#72091c80 slug:string = InputWallPaper;
|
||||||
account.wallPapersNotModified#1c199183 = account.WallPapers;
|
account.wallPapersNotModified#1c199183 = account.WallPapers;
|
||||||
account.wallPapers#702b65a9 hash:int wallpapers:Vector<WallPaper> = account.WallPapers;
|
account.wallPapers#702b65a9 hash:int wallpapers:Vector<WallPaper> = account.WallPapers;
|
||||||
|
|
||||||
codeSettings#302f59f3 flags:# allow_flashcall:flags.0?true current_number:flags.1?true app_hash_persistent:flags.2?true app_hash:flags.3?string = CodeSettings;
|
codeSettings#debebe83 flags:# allow_flashcall:flags.0?true current_number:flags.1?true allow_app_hash:flags.4?true = CodeSettings;
|
||||||
|
|
||||||
wallPaperSettings#a12f40b8 flags:# blur:flags.1?true motion:flags.2?true background_color:flags.0?int intensity:flags.3?int = WallPaperSettings;
|
wallPaperSettings#a12f40b8 flags:# blur:flags.1?true motion:flags.2?true background_color:flags.0?int intensity:flags.3?int = WallPaperSettings;
|
||||||
|
|
||||||
|
@ -1411,7 +1410,7 @@ photos.deletePhotos#87cf7f2f id:Vector<InputPhoto> = Vector<long>;
|
||||||
photos.getUserPhotos#91cd32a8 user_id:InputUser offset:int max_id:long limit:int = photos.Photos;
|
photos.getUserPhotos#91cd32a8 user_id:InputUser offset:int max_id:long limit:int = photos.Photos;
|
||||||
|
|
||||||
upload.saveFilePart#b304a621 file_id:long file_part:int bytes:bytes = Bool;
|
upload.saveFilePart#b304a621 file_id:long file_part:int bytes:bytes = Bool;
|
||||||
upload.getFile#e3a6cfb5 location:InputFileLocation offset:int limit:int = upload.File;
|
upload.getFile#b15a9afc flags:# precise:flags.0?true location:InputFileLocation offset:int limit:int = upload.File;
|
||||||
upload.saveBigFilePart#de7b673d file_id:long file_part:int file_total_parts:int bytes:bytes = Bool;
|
upload.saveBigFilePart#de7b673d file_id:long file_part:int file_total_parts:int bytes:bytes = Bool;
|
||||||
upload.getWebFile#24e6818d location:InputWebFileLocation offset:int limit:int = upload.WebFile;
|
upload.getWebFile#24e6818d location:InputWebFileLocation offset:int limit:int = upload.WebFile;
|
||||||
upload.getCdnFile#2000bcc3 file_token:bytes offset:int limit:int = upload.CdnFile;
|
upload.getCdnFile#2000bcc3 file_token:bytes offset:int limit:int = upload.CdnFile;
|
||||||
|
|
|
@ -163,9 +163,7 @@ void ChangePhoneBox::EnterPhone::submit() {
|
||||||
_requestId = MTP::send(
|
_requestId = MTP::send(
|
||||||
MTPaccount_SendChangePhoneCode(
|
MTPaccount_SendChangePhoneCode(
|
||||||
MTP_string(phoneNumber),
|
MTP_string(phoneNumber),
|
||||||
MTP_codeSettings(
|
MTP_codeSettings(MTP_flags(0))),
|
||||||
MTP_flags(0),
|
|
||||||
MTPstring())),
|
|
||||||
rpcDone(crl::guard(this, [=](
|
rpcDone(crl::guard(this, [=](
|
||||||
const MTPauth_SentCode &result) {
|
const MTPauth_SentCode &result) {
|
||||||
return sendPhoneDone(phoneNumber, result);
|
return sendPhoneDone(phoneNumber, result);
|
||||||
|
|
|
@ -219,9 +219,7 @@ void ConfirmPhoneBox::checkPhoneAndHash() {
|
||||||
_sendCodeRequestId = MTP::send(
|
_sendCodeRequestId = MTP::send(
|
||||||
MTPaccount_SendConfirmPhoneCode(
|
MTPaccount_SendConfirmPhoneCode(
|
||||||
MTP_string(_hash),
|
MTP_string(_hash),
|
||||||
MTP_codeSettings(
|
MTP_codeSettings(MTP_flags(0))),
|
||||||
MTP_flags(0),
|
|
||||||
MTPstring())),
|
|
||||||
rpcDone(&ConfirmPhoneBox::sendCodeDone),
|
rpcDone(&ConfirmPhoneBox::sendCodeDone),
|
||||||
rpcFail(&ConfirmPhoneBox::sendCodeFail));
|
rpcFail(&ConfirmPhoneBox::sendCodeFail));
|
||||||
}
|
}
|
||||||
|
|
|
@ -223,6 +223,7 @@ StickerSetBox::Inner::Inner(
|
||||||
}, [&](const MTPDinputStickerSetShortName &data) {
|
}, [&](const MTPDinputStickerSetShortName &data) {
|
||||||
_setShortName = qs(data.vshort_name());
|
_setShortName = qs(data.vshort_name());
|
||||||
}, [&](const MTPDinputStickerSetEmpty &) {
|
}, [&](const MTPDinputStickerSetEmpty &) {
|
||||||
|
}, [&](const MTPDinputStickerSetAnimatedEmoji &) {
|
||||||
});
|
});
|
||||||
|
|
||||||
_mtp.request(MTPmessages_GetStickerSet(
|
_mtp.request(MTPmessages_GetStickerSet(
|
||||||
|
|
|
@ -1134,6 +1134,8 @@ bool DocumentData::isStickerSetInstalled() const {
|
||||||
return false;
|
return false;
|
||||||
}, [&](const MTPDinputStickerSetEmpty &) {
|
}, [&](const MTPDinputStickerSetEmpty &) {
|
||||||
return false;
|
return false;
|
||||||
|
}, [&](const MTPDinputStickerSetAnimatedEmoji &) {
|
||||||
|
return false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -380,6 +380,7 @@ auto ApiWrap::fileRequest(const Data::FileLocation &location, int offset) {
|
||||||
return std::move(_mtp.request(MTPInvokeWithTakeout<MTPupload_GetFile>(
|
return std::move(_mtp.request(MTPInvokeWithTakeout<MTPupload_GetFile>(
|
||||||
MTP_long(*_takeoutId),
|
MTP_long(*_takeoutId),
|
||||||
MTPupload_GetFile(
|
MTPupload_GetFile(
|
||||||
|
MTP_flags(0),
|
||||||
location.data,
|
location.data,
|
||||||
MTP_int(offset),
|
MTP_int(offset),
|
||||||
MTP_int(kFileChunkSize))
|
MTP_int(kFileChunkSize))
|
||||||
|
|
|
@ -122,9 +122,7 @@ void PhoneWidget::submit() {
|
||||||
MTP_string(_sentPhone),
|
MTP_string(_sentPhone),
|
||||||
MTP_int(ApiId),
|
MTP_int(ApiId),
|
||||||
MTP_string(ApiHash),
|
MTP_string(ApiHash),
|
||||||
MTP_codeSettings(
|
MTP_codeSettings(MTP_flags(0))),
|
||||||
MTP_flags(0),
|
|
||||||
MTPstring())),
|
|
||||||
rpcDone(&PhoneWidget::phoneSubmitDone),
|
rpcDone(&PhoneWidget::phoneSubmitDone),
|
||||||
rpcFail(&PhoneWidget::phoneSubmitFail));
|
rpcFail(&PhoneWidget::phoneSubmitFail));
|
||||||
}
|
}
|
||||||
|
|
|
@ -309,7 +309,11 @@ void DedicatedLoader::sendRequest() {
|
||||||
const auto offset = _offset;
|
const auto offset = _offset;
|
||||||
_requests.push_back({ offset });
|
_requests.push_back({ offset });
|
||||||
_mtp.send(
|
_mtp.send(
|
||||||
MTPupload_GetFile(_location, MTP_int(offset), MTP_int(kChunkSize)),
|
MTPupload_GetFile(
|
||||||
|
MTP_flags(0),
|
||||||
|
_location,
|
||||||
|
MTP_int(offset),
|
||||||
|
MTP_int(kChunkSize)),
|
||||||
[=](const MTPupload_File &result) { gotPart(offset, result); },
|
[=](const MTPupload_File &result) { gotPart(offset, result); },
|
||||||
failHandler(),
|
failHandler(),
|
||||||
MTP::updaterDcId(_dcId));
|
MTP::updaterDcId(_dcId));
|
||||||
|
|
|
@ -2084,9 +2084,7 @@ QString FormController::getPlainTextFromValue(
|
||||||
void FormController::startPhoneVerification(not_null<Value*> value) {
|
void FormController::startPhoneVerification(not_null<Value*> value) {
|
||||||
value->verification.requestId = request(MTPaccount_SendVerifyPhoneCode(
|
value->verification.requestId = request(MTPaccount_SendVerifyPhoneCode(
|
||||||
MTP_string(getPhoneFromValue(value)),
|
MTP_string(getPhoneFromValue(value)),
|
||||||
MTP_codeSettings(
|
MTP_codeSettings(MTP_flags(0))
|
||||||
MTP_flags(0),
|
|
||||||
MTPstring())
|
|
||||||
)).done([=](const MTPauth_SentCode &result) {
|
)).done([=](const MTPauth_SentCode &result) {
|
||||||
Expects(result.type() == mtpc_auth_sentCode);
|
Expects(result.type() == mtpc_auth_sentCode);
|
||||||
|
|
||||||
|
|
|
@ -782,6 +782,7 @@ mtpRequestId mtpFileLoader::sendRequest(const RequestData &requestData) {
|
||||||
}, [&](const StorageFileLocation &location) {
|
}, [&](const StorageFileLocation &location) {
|
||||||
return MTP::send(
|
return MTP::send(
|
||||||
MTPupload_GetFile(
|
MTPupload_GetFile(
|
||||||
|
MTP_flags(0),
|
||||||
location.tl(session().userId()),
|
location.tl(session().userId()),
|
||||||
MTP_int(offset),
|
MTP_int(offset),
|
||||||
MTP_int(limit)),
|
MTP_int(limit)),
|
||||||
|
|
|
@ -157,7 +157,10 @@ StorageFileLocation::StorageFileLocation(
|
||||||
_id = data.vid().v;
|
_id = data.vid().v;
|
||||||
_accessHash = data.vaccess_hash().v;
|
_accessHash = data.vaccess_hash().v;
|
||||||
}, [&](const MTPDinputStickerSetShortName &data) {
|
}, [&](const MTPDinputStickerSetShortName &data) {
|
||||||
Unexpected("inputStickerSetShortName in StorageFileLocation().");
|
Unexpected("inputStickerSetShortName in StorageFileLocation.");
|
||||||
|
}, [&](const MTPDinputStickerSetAnimatedEmoji &data) {
|
||||||
|
Unexpected(
|
||||||
|
"inputStickerSetAnimatedEmoji in StorageFileLocation.");
|
||||||
});
|
});
|
||||||
_volumeId = data.vvolume_id().v;
|
_volumeId = data.vvolume_id().v;
|
||||||
_localId = data.vlocal_id().v;
|
_localId = data.vlocal_id().v;
|
||||||
|
|
Loading…
Reference in New Issue