luyadev / luya-headless Goto Github PK
View Code? Open in Web Editor NEWA client library to access content from the LUYA APIs (or any other REST API).
Home Page: https://luya.io
License: MIT License
A client library to access content from the LUYA APIs (or any other REST API).
Home Page: https://luya.io
License: MIT License
php-mod/curl#53 new option for CurlFile
If the response is not a 200 status, the response should not be cached. Not sure this is the case, needs to verified.
As its very common to setup multiple cache keys with the same time like (now + 60seconds) we should introduce an option which adds a random time range to an existing cache lifetime (like + rand(0,10)
Currently its not possible to override the endpointName token with using setTokens
Q | A |
---|---|
LUYA Version | |
PHP Version | |
Platform | Apache/XAMPP/MAMPP/etc. |
Operating system | Windows/Linux Server/OSX/etc. |
License is missing... maybe MIT License like the LUYA main modules.
Sometimes items of a list response are enclosed within a tag like items' => [...]
an optional setting for an active endpoint to handle such a situtation.
there must be an argument for the process method or different methods for all and one.
The setCache() option should also provide a key which can be defined instead of dynamic generating of cache keys. This can be useful in order to flush an explicit cache key.
When using view([1,2]) it should generate endpoint/1,2
, otherwise its hard to work with composite keys.
Get only 1 item even when calling the all() this can be usedfull in combiation of setPerPage(1) and setSort()
->setPerPage(1)->setSort(['publication_date' => SORT_DESC])->one()
In model context, the delete() method should exists and call remove()
The language information must be part of cache key
https://demo.luya.io/en/admin/login
Log in as admin and check XHR responses.
Valid JSON
Invalid JSON always starting with )]}',
Problem is in any version.
Using docker version with nginx, so no apache modules
1: [ini_get('short_open_tag')] ''
2: [ini_get('error_reporting')] '32767'
3: [phpversion()] '7.2.17'
4: [php_ini_loaded_file()] false
5: [php_sapi_name()] 'fpm-fcgi'
6: [isset($_SERVER['SERVER_SOFTWARE']) ? $_SERVER['SERVER_SOFTWARE'] : unknown] 'nginx/1.17.2'
Q | A |
---|---|
LUYA Version | Kickstarter 1.0.6 with core 1.0.20, headless 2.3.0, module-admin 2.1.0, bootstrap 1.0.5, composer 1.0.5, generic 1.0.4 |
PHP Version | 7.2.17 |
Platform | Docker with luyadev/luya-docker-php, mysql:5.7, nginx:latest |
Operating system | OSX |
Needed to run composer require luyadev/luya-headless:dev-master --prefer-source
otherwise getting error
[InvalidArgumentException]
Could not find a version of package luyadev/luya-headless matching your minimum-stability (sta
ble). Require it with an explicit version constraint allowing its desired stability.
When saving values with save() and its an insert, there can be fields which are returned from the api and should be assigned afterwards (assuming a model returns a token after creating, this should be assigned after saving)
Add option to set Language for i18n Fields in Client
$client = new Client('TOKEN', 'BASE_URL', 'de');
add new option to default expand properties, this can be used for definition inside find methods but users can set setExpand() other fields.
If a problem appears while creating the models (iterator) an exception should be thrown.
Its not possoblie to use setFields, setExpand etc for findAllPages()
in order to return a single entry: find()->with(['timetables'])->one(1337); one needs to set setEndpoint('{endpointName}/{id}') - one should do this or there should be a short code for this like:
Add time() to a filter or arg, this will result in constantly new generating of cache key .. which makes caching useless.
Cachekey should be consistent. Therfore we need something like:
new DynamicValue(time()) which will threat this expression as "static".
An option to sort the models after they have been assigned to the model.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.