{"id":15296288,"url":"https://github.com/librecodecoop/ojs-sdk","last_synced_at":"2025-02-23T23:31:53.336Z","repository":{"id":37957622,"uuid":"220549321","full_name":"LibreCodeCoop/ojs-sdk","owner":"LibreCodeCoop","description":"SDK package for the OJS","archived":false,"fork":false,"pushed_at":"2023-04-19T21:19:28.000Z","size":96,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-17T12:17:00.635Z","etag":null,"topics":["ojs","php","php7","sdk","sdk-php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LibreCodeCoop.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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":"2019-11-08T21:19:32.000Z","updated_at":"2022-02-12T13:34:34.000Z","dependencies_parsed_at":"2024-10-15T01:21:45.688Z","dependency_job_id":"37e415e8-4882-4ddc-ab4f-19a59d89e4ea","html_url":"https://github.com/LibreCodeCoop/ojs-sdk","commit_stats":{"total_commits":51,"total_committers":4,"mean_commits":12.75,"dds":"0.21568627450980393","last_synced_commit":"ab0d17c3558e1e66fe0828986a723733972022ba"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LibreCodeCoop%2Fojs-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LibreCodeCoop%2Fojs-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LibreCodeCoop%2Fojs-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LibreCodeCoop%2Fojs-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LibreCodeCoop","download_url":"https://codeload.github.com/LibreCodeCoop/ojs-sdk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240395717,"owners_count":19794571,"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","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":["ojs","php","php7","sdk","sdk-php"],"created_at":"2024-09-30T18:09:58.167Z","updated_at":"2025-02-23T23:31:53.261Z","avatar_url":"https://github.com/LibreCodeCoop.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Test Status](https://github.com/librecodecoop/ojs-sdk/workflows/ci/badge.svg?branch=main)\n\n# OJS-SDK\n\nSDK package for the [OJS](https://pkp.sfu.ca/ojs/)\n\n## Install\n\n```bash\ncomposer require librecodecoop/ojs-sdk\n```\n\n## Configure\n\nOJS installed in the same server is necessary. Inform the path of OJS for all dependencies and the login URL if you need make login and get a user token after login.\n\n| Environment     | Suggested value                                 | Usage                                     |\n| --------------- | ----------------------------------------------- | ----------------------------------------- |\n| OJS_VERSION     | 3_2_1-1                                         | Setup development environment with Docker |\n| DB_PASSWD       | root                                            | Setup development environment with Docker |\n| OJS_WEB_BASEDIR | /app/ojs                                        | For make all                              |\n| OJS_LOGIN_URL   | http://localhost/ojs/index.php/journal/login/signIn | Only for login                            |\n\n## How to use?\n\n* Create or update user:\n```php\nuse OjsSdk\\Services\\OJSService\\Users\\OJSUserService;\n\n$OjsClient = new OJSUserService();\n$return = $OjsClient-\u003ecreateUpdateUser([\n    'username'       =\u003e 'jhonusername',\n    'password'       =\u003e '123password',\n    'email'          =\u003e 'jhon.doe@test.coop',\n    'mailingAddress' =\u003e 'Street 55',\n    'locales'        =\u003e ['en_US'],\n    'groups'         =\u003e [1], // administrator\n    'givenName'      =\u003e ['en_US' =\u003e 'Jhon'],\n    'familyName'     =\u003e ['en_US' =\u003e 'Doe'],\n    'phone'          =\u003e '+123456789',\n    'lattes'         =\u003e 'https://lattes.com'\n]);\n```\n* changePassword\n\n```php\nuse OjsSdk\\Services\\OJSService\\Users\\OJSUserService;\n\n$OjsClient = new OJSUserService();\n$OjsClient-\u003echangePassword('jhonusername', '123password');\n```\n* getUniqueUsername\n\n```php\nuse OjsSdk\\Services\\OJSService\\Users\\OJSUserService;\n\n$OjsClient = new OJSUserService();\n$uniqueUsername = $OjsClient-\u003egetUniqueUsername('jhonusername', '123password');\n```\n\n* Login\n\n```php\nuse OjsSdk\\Services\\OJSService\\Users\\OJSUserService;\n\n$OjsClient = new OJSUserService();\n$loginResponse = $OjsClient-\u003elogin('jhonusername', '123password');\n```\n\n### Make anyfing\n\nThe method `OjsProvider::getApplication();` make all necessary to use all classes of OJS.\n\nFor more informations see [OJSUserServiceTest.php](tests/Services/OJSService/Users/OJSUserServiceTest.php) or [OJSUserService.php](src/Services/OJSService/Users/OJSUserService.php).\n\n\n## Development\n\nUse Docker for create a development environment.\n\nIf you don't use Docker, read the [entrypoint.sh](.docker/php7/entrypoint.sh) and [Dockerfile](.docker/php7/Dockerfile).\n\nRunning tests:\n\n```bash\ncomposer test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibrecodecoop%2Fojs-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flibrecodecoop%2Fojs-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibrecodecoop%2Fojs-sdk/lists"}