You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
974 B
55 lines
974 B
# gemini-php 0.3.0 |
|
|
|
Version 0.3.0 is here! |
|
|
|
Includes new classes for object-oriented work with gemtext (text/gemini) |
|
|
|
## Example |
|
|
|
``` php |
|
$request = new \Yggverse\Gemini\Client\Request( |
|
'gemini://yggverse.cities.yesterweb.org' |
|
); |
|
|
|
$response = new \Yggverse\Gemini\Client\Response( |
|
$request->getResponse() |
|
); |
|
|
|
$body = new \Yggverse\Gemini\Gemtext\Body( |
|
$response->getBody() |
|
); |
|
|
|
var_dump( |
|
$body->getH2() |
|
); |
|
|
|
foreach ($body->getLinks() as $line) |
|
{ |
|
$link = new \Yggverse\Gemini\Gemtext\Link( |
|
$line |
|
); |
|
|
|
var_dump( |
|
$link->getAddress() |
|
); |
|
|
|
var_dump( |
|
$link->getAlt() |
|
); |
|
|
|
var_dump( |
|
$link->getDate( |
|
$timestamp // get unix time from this variable |
|
) |
|
); |
|
|
|
var_dump( |
|
$timestamp |
|
); |
|
} |
|
``` |
|
|
|
## Links |
|
|
|
=> https://github.com/YGGverse/gemini-php/releases/tag/0.3.0 Download gemini-php 0.3.0 |
|
=> https://github.com/YGGverse/gemini-php?tab=readme-ov-file#gemtext Gemtext API methods
|
|
|