mirror of
https://github.com/kodjodevf/mangayomi-extensions.git
synced 2026-02-14 19:01:15 +00:00
Update CONTRIBUTING
This commit is contained in:
@@ -45,7 +45,7 @@ final testSourceModelList = [
|
|||||||
sourceCode: testSourceCode,
|
sourceCode: testSourceCode,
|
||||||
// Example: en
|
// Example: en
|
||||||
lang: "",
|
lang: "",
|
||||||
// Example: false for true for manga
|
// Example: false for anime true for manga
|
||||||
isManga: false)
|
isManga: false)
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -56,6 +56,9 @@ import 'dart:convert';
|
|||||||
class TestSource extends MProvider {
|
class TestSource extends MProvider {
|
||||||
TestSource();
|
TestSource();
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool get supportsLatest => true;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<MPages> getPopular(MSource source, int page) async {
|
Future<MPages> getPopular(MSource source, int page) async {
|
||||||
// TODO: implement
|
// TODO: implement
|
||||||
@@ -229,25 +232,34 @@ All control filters can have a default state set. It's usually recommended if th
|
|||||||
## Some functions already available and usable
|
## Some functions already available and usable
|
||||||
|
|
||||||
|
|
||||||
### http
|
### http client
|
||||||
|
|
||||||
Return a body response as `String`
|
Return a body response as Response
|
||||||
```bash
|
```bash
|
||||||
- Simple request
|
- Simple request
|
||||||
|
|
||||||
String res = await http('GET', json.encode({'url': 'http://example.com'}));
|
final client = Client();
|
||||||
|
|
||||||
|
final res = await client.get(Uri.parse("http://example.com"));
|
||||||
|
|
||||||
|
print(res.body);
|
||||||
|
|
||||||
- With headers
|
- With headers
|
||||||
|
|
||||||
String res = await http('GET', json.encode({'url': 'http://example.com','headers':{'Referer': 'http://example.com'}}));
|
final client = Client();
|
||||||
|
|
||||||
|
final res = await client.get(Uri.parse("http://example.com"),headers:{"Referer": "http://example.com"});
|
||||||
|
|
||||||
|
print(res.body);
|
||||||
|
|
||||||
- With body
|
- With body
|
||||||
|
|
||||||
String res = await http('POST', json.encode({'url': 'http://example.com','body':{'name':'test'}}));
|
final client = Client();
|
||||||
|
|
||||||
- With FormBuilder
|
final res = await client.post(Uri.parse("http://example.com"),headers:{"Referer": "http://example.com"},'body':{'name':'test'});
|
||||||
|
|
||||||
|
print(res.body);
|
||||||
|
|
||||||
String res = await http('POST',json.encode({'useFormBuilder': true,'body': {'name':'test'},'url': 'http://example.com'}));
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### xpath selector
|
### xpath selector
|
||||||
@@ -331,6 +343,7 @@ See [`MDocument` model](https://github.com/kodjodevf/mangayomi/blob/main/lib/eva
|
|||||||
- `String` substringAfterLast(`String text`, `String pattern`)
|
- `String` substringAfterLast(`String text`, `String pattern`)
|
||||||
- `String` substringBefore(`String text`, `String pattern`)
|
- `String` substringBefore(`String text`, `String pattern`)
|
||||||
- `String` substringBeforeLast(`String text`, `String pattern`)
|
- `String` substringBeforeLast(`String text`, `String pattern`)
|
||||||
|
- `String` getUrlWithoutDomain(`String url`)
|
||||||
|
|
||||||
### Crypto utils
|
### Crypto utils
|
||||||
- `String` unpackJs(`String code`);
|
- `String` unpackJs(`String code`);
|
||||||
|
|||||||
Reference in New Issue
Block a user