Code Monkey home page Code Monkey logo

lodapi's People

Contributors

brrd avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

lodapi's Issues

Concurrency setting

Support concurrency out of the box with a concurrency option.

Instantiate a p-limit in LodelSession constructor and store it as a property + use it in methods.

mergeEntries error

Long URL like:

lodel/admin/index.php?do=massassoc&lo=entries&edit=1&associate=1&identities[0]=5992&identities[1]=3727&identities[2]=4975&identities[3]=5618&identities[4]=2225&identities[5]=5835&identities[6]=4158&identities[7]=6163&identities[8]=4124&identities[9]=4103&identities[10]=5301&identities[11]=6190&identities[12]=4111&identities[13]=2405&identities[14]=4329&identities[15]=6000&identities[16]=4295&identities[17]=3452&identities[18]=5567&identities[19]=4107&identities[20]=4109&identries[0]=7637_6263

returns an error 500 with this message:

PHP Error (Notice) in file '/var/www/dev/lodel/lodel/scripts/context.php' on line 202 : 
Uninitialized string offset: 10

PHP Error (Notice) in file '/var/www/dev/lodel/lodel/scripts/context.php' on line 202 : 
Uninitialized string offset: 11

PHP Error (Notice) in file '/var/www/dev/lodel/lodel/scripts/context.php' on line 202 : 
Uninitialized string offset: 12

PHP Error (Notice) in file '/var/www/dev/lodel/lodel/scripts/context.php' on line 202 : 
Uninitialized string offset: 13

PHP Error (Notice) in file '/var/www/dev/lodel/lodel/scripts/context.php' on line 202 : 
Uninitialized string offset: 14

PHP Error (Notice) in file '/var/www/dev/lodel/lodel/scripts/context.php' on line 202 : 
Uninitialized string offset: 15

PHP Error (Notice) in file '/var/www/dev/lodel/lodel/scripts/context.php' on line 202 : 
Uninitialized string offset: 16

PHP Error (Notice) in file '/var/www/dev/lodel/lodel/scripts/context.php' on line 202 : 
Uninitialized string offset: 17

PHP Error (Notice) in file '/var/www/dev/lodel/lodel/scripts/context.php' on line 202 : 
Uninitialized string offset: 18

PHP Error (Notice) in file '/var/www/dev/lodel/lodel/scripts/context.php' on line 202 : 
Uninitialized string offset: 19

PHP Error (Notice) in file '/var/www/dev/lodel/lodel/scripts/context.php' on line 202 : 
Uninitialized string offset: 20

Looks like Lodel massassoc doesn't work well with more than 10 entities to move.
Possible workaround: split this in multiple requests.

Détecter les erreur de login/sites bloqués

Lorsque le site est bloqué, lodapi échoue sur un timeout:

code: 'ESOCKETTIMEDOUT',
connect: false,
level: 'error',
timestamp: '2023-02-19T11:03:46.624Z',
[Symbol(level)]: 'error',
[Symbol(message)]: '2023-02-19T11:03:46.624Z error: ESOCKETTIMEDOUT'

Il faudrait parser la page de réponse du formulaire et logger le message d'échec d'authentification.

Harmonisation de l'API

  1. Les arguments sont nommés ou anonymes selon la méthode, ce qui n'est pas logique.
  2. La forme du paramètre data n'est pas identique partout. Certaines méthodes utilisent la forme field: value, d'autres la forme data[field]: value.

Exemple (deux en un) :

await session.createPublication({ idParent: 0, idType: 12, data: { "titre": "Foo bar" } });

await session.editIndex(123, "entries", { "data[definition]": "Foo bar" });

Upload cover

Déplace la méthode d'import des images d'accroche depuis emfixer vers lodapi.

mergePersons() method is broken

The workaround (= resubmitting an entity to remove its related duplicate persons) does not seam to work anymore.
This needs further investigation.

Add move() method

Example: site/lodel/edition/index.php?do=move&id=74&idparent=3698

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.