{"id":18794208,"url":"https://github.com/celdotro/marketplace_examples","last_synced_at":"2025-07-29T15:35:10.335Z","repository":{"id":37547933,"uuid":"92496667","full_name":"celdotro/marketplace_examples","owner":"celdotro","description":"Examples for CEL.ro Marketplace API wrapper","archived":false,"fork":false,"pushed_at":"2023-04-19T19:20:17.000Z","size":344,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-21T16:12:16.662Z","etag":null,"topics":["api-wrapper","cel","cel-marketplace","celdotro","documentation","examples","marketplace","marketplace-api-wrapper-doc","marketplace-api-wrapper-examples","php","ro-marketplace"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/celdotro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-26T09:48:09.000Z","updated_at":"2020-08-14T10:02:59.000Z","dependencies_parsed_at":"2024-12-29T15:46:27.473Z","dependency_job_id":"66672a03-01ad-45a8-92d9-971610c2838c","html_url":"https://github.com/celdotro/marketplace_examples","commit_stats":null,"previous_names":[],"tags_count":54,"template":false,"template_full_name":null,"purl":"pkg:github/celdotro/marketplace_examples","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/celdotro%2Fmarketplace_examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/celdotro%2Fmarketplace_examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/celdotro%2Fmarketplace_examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/celdotro%2Fmarketplace_examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/celdotro","download_url":"https://codeload.github.com/celdotro/marketplace_examples/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/celdotro%2Fmarketplace_examples/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267709605,"owners_count":24131922,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-wrapper","cel","cel-marketplace","celdotro","documentation","examples","marketplace","marketplace-api-wrapper-doc","marketplace-api-wrapper-examples","php","ro-marketplace"],"created_at":"2024-11-07T21:28:40.124Z","updated_at":"2025-07-29T15:35:10.275Z","avatar_url":"https://github.com/celdotro.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CEL.ro: marketplace_examples\n**[[RO](https://github.com/celdotro/marketplace_examples#ro)]** Exemple pentru folosirea API wrapper-ului [marketplaceului](https://github.com/celdotro/marketplace)  \n**[[EN](https://github.com/celdotro/marketplace_examples#en)]** Examples for [marketplace's](https://github.com/celdotro/marketplace) API wrapper usage\n___\n## [RO]\n\n### Despre\nAcest proiect contine exemple ce pot fi folosite pentru intelegerea mai buna a [API Wrapper-ului pentru CEL.ro Marketplace](https://github.com/celdotro/marketplace).  \nPentru instructiunile generale legate de utilizarea wrapper-ului, va trebui sa consultati [documentatia](https://github.com/celdotro/marketplace/wiki/Prima-pagina):\n\n* Instalare (WIKI): [https://github.com/celdotro/marketplace/wiki/Instalare#instalare-1](https://github.com/celdotro/marketplace/wiki/Instalare#instalare-1)\n* Folosire (WIKI): [https://github.com/celdotro/marketplace/wiki/Instalare#folosire](https://github.com/celdotro/marketplace/wiki/Instalare#folosire)\n\n### Setari principale\nRulati urmatoarea comanda in directorul principal  \n```shell\ncomposer install\n``` \n\n### Structura fisierelor si directoarelor\n1. Fisierul \"api_include.php\" aflat la baza structurii include fisierul index al API-ului. De asemenea, contine o sectiune de comentarii in care sunt reluate problemele discutate in \"Setari principale\". iii. Acesta contine namespaceul si numele clasei de autentificare, precum si metoda statica ce trebuie folosita inainte de apelarea oricarei alte metode din API. Pentru a rula oricare dintre script-uri, va trebui sa inlocuiti numele de utilizator si parola cu cele aferente contului dumneavoastra. De asemenea, daca doriti sa utilizati serverul live, va trebui sa comentati linia de cod:\n   ```php\n   celmarket\\Config::setDemo();\n   ```\n2. Fiecare director reprezinta o categorie de exemple: Products (Produse), Pages (Pagini), Orders (Comenzi), Invoices (Facturi), AWB  \n3. Fiecare fisier este compus din 5 parti  \n    i. **comentariu** =\u003e pune la dispozitie o scurta descriere a exemplului (in RO si EN)  \n    ii. **include** =\u003e include api_include.php (este necesar numai pentru exemple)  \n    iii. **use** =\u003e contine namespaceul si numele clasei folosite din API  \n    iv. **functie** =\u003e contine instructiunile principale prin care API-ul poate fi folosit. De asemenea, parametrii functiei corespund intocmai celor ai metodei din API  \n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;- instantierea obiectului  \n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;- declararea unui bloc try-catch  \n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;- apeleaza functia necesara si stocheaza valoarea returnata in variabila $response  \n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;- printeaza valoarea returnata sau foloseste echo pentru mesajul de eroare  \n    vi. **exemplu** =\u003e apeleaza functia cu date aleatorii. In functie de datele pe care le aveti deja, exista posibilitatea ca argumentele functiei sa nu duca la returnarea de valori relevante, de aceea ar trebui sa le schimbati in consecinta.  \n\n### Rulare script\n\u003eExemplu\n```shell\nphp /CALE_CATRE_PROIECT/Orders/1.getOrdersSummary.php\n```\n\n### Index\nIn folderul principal, fisierul *index.php* genereaza automat un cuprins al tuturor directoarelor si fisierelor relevante pentru exemple. Acesta poate fi folosit ca referinta, dar este incurajata rularea din linia de comanda si editarea manuala a fisierelor, proiectul fiind conceput pentru a servi intelegerii modului de utilizare al API wrapper-ului de catre programatori, nu pentru a demonstra facilitatile API-ului.\n\n1. Accesare prin intermediul unui server web\n    ```\n    http://****/marketplace_examples/index.php\n    ```\n2. Accesare prin intermediul liniei de comanda\n   ```shell\n   php index.php\n   ```\n\n### Contact\n\u003e dp [_ AT _] cel.ro\n___\n## [EN]\n\n### About\nThis project contains examples that can be used for a better understanding of [CEL.ro Marketplace API Wrapper](https://github.com/celdotro/marketplace).  \nFor general instructions about the wrapper's usage, read the [documentation](https://github.com/celdotro/marketplace/wiki/First-page).  \n\n* Install (WIKI): [https://github.com/celdotro/marketplace/wiki/Install#installation-1](https://github.com/celdotro/marketplace/wiki/Install#installation-1)\n* Use (WIKI): [https://github.com/celdotro/marketplace/wiki/Install#use](https://github.com/celdotro/marketplace/wiki/Install#use)\n\n### Main settings\nRun the following command in the main folder  \n```shell\ncomposer install\n``` \n### Files and folders structure\n1. The file \"api_include.php\" situated in the path root includes the path for the API index file. It also provides a comment section about the issues presented in \"Main settings\". It contains the namespace and class name used in the authentication process, and the static method that must be called before calling any other method of the API. In order to use any script you must replace the user name and password with the supplied credentials. Also, if you decide to use the live server, you should comment out the line below\n   ```php\n   celmarket\\Config::setDemo();\n   ```\n2. Each folder represents a category of examples: Products, Pages, Orders, Invoices and AWBs  \n3. Each file has 5 parts  \n    i. **comment** =\u003e provides a short description of the example (in RO and EN)  \n    ii. **include** =\u003e includes api_include.php (this is only necessary for the example to work)  \n    iii. **use** =\u003e contains the used namespace and class from the API  \n    iv. **function** =\u003e contains the main logic of the API usage. Also, parameters map perfectly with the API method.  \n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;- instantiate object  \n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;- declare try-catch block  \n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;- call the appropriate function and store the returned value in the $response variable  \n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;- print the returned value or echo the error message  \n    vi. **example** =\u003e calls the function with random data. Depending on your specific case, the provided arguments may not render relevant return values, therefore you should change them accordingly.\n\n### Run script\n\u003eExample\n```shell\nphp /PATH_TO_PROJECT/Orders/1.getOrdersSummary.php\n```\n\n### Index\nThe file *index.php* from the main folder automatically generates a contents of all relevant folders and files needed for examples. This can be used as a reference point, but running the scripts from command line and manually editing files are highly recommended because this project's purpose is to help programmers with the process of understanding of how the API wrapper works and not to be a showcase of the API.\n\n1. Access through a web server\n    ```\n    http://****/marketplace_examples/index.php\n    ```\n2. Access through the command line\n   ```shell\n   php index.php\n   ```\n\n### Contact\n\u003e dp [_ AT _] cel.ro","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fceldotro%2Fmarketplace_examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fceldotro%2Fmarketplace_examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fceldotro%2Fmarketplace_examples/lists"}