This commit is contained in:
Daniil Gentili 2017-08-25 15:06:04 +02:00
commit 691426ae3a
4 changed files with 35 additions and 34 deletions

View File

@ -30,7 +30,7 @@ $docs = [
'description' => 'MadelineProto API documentation (td-lib)',
'output_dir' => __DIR__.'/docs/TD_docs',
'readme' => false,
'td' => true
'td' => true,
],
[
'tl_schema' => ['mtproto' => __DIR__.'/src/danog/MadelineProto/TL_mtproto_v1.json'],

View File

@ -126,7 +126,6 @@ description: constructors and methods of type '.$type.'
$header .= isset($this->td_descriptions['types'][$otype]) ? $this->td_descriptions['types'][$otype].PHP_EOL.PHP_EOL : '';
if (!isset($this->settings['td'])) {
if (in_array($type, ['User', 'InputUser', 'Chat', 'InputChannel', 'Peer', 'InputPeer'])) {
$header .= 'The following syntaxes can also be used:
@ -373,7 +372,8 @@ Note: when modifying this property, *never* overwrite the previous values. Alway
After modifying it, you must always parse the new configuration with a call to `parseConfig`.
';
}}
}
}
if (file_exists('types/'.$type.'.md')) {
\danog\MadelineProto\Logger::log([$type]);
}

View File

@ -157,7 +157,6 @@ description: '.$description.'
';
$example = '';
if (!isset($this->settings['td'])) {
$example = '### Example:
```
@ -224,7 +223,8 @@ You can also use normal markdown, note that to create mentions you must use the
MadelineProto supports all html entities supported by [html_entity_decode](http://php.net/manual/en/function.html-entity-decode.php).
';
}}
}
}
file_put_contents('constructors/'.$constructor.$layer.'.md', $header.$table.$type.$example);
}
\danog\MadelineProto\Logger::log(['Generating constructors index...'], \danog\MadelineProto\Logger::NOTICE);

View File

@ -267,7 +267,8 @@ You can also use normal markdown, note that to create mentions you must use the
MadelineProto supports all html entities supported by [html_entity_decode](http://php.net/manual/en/function.html-entity-decode.php).
';
}}
}
}
file_put_contents('methods/'.$method.'.md', $header.$table.$return.$example);
}