{"id":22753000,"url":"https://github.com/kianmeng/webservice-swapi","last_synced_at":"2025-09-01T09:37:40.437Z","repository":{"id":56836110,"uuid":"79046999","full_name":"kianmeng/webservice-swapi","owner":"kianmeng","description":"The Perl helper library for Star War API, http://swapi.co","archived":false,"fork":false,"pushed_at":"2019-05-02T13:53:25.000Z","size":108,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-30T07:17:29.537Z","etag":null,"topics":["api","cpan","perl","star-wars"],"latest_commit_sha":null,"homepage":"","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kianmeng.png","metadata":{"files":{"readme":"README.md","changelog":"Changes","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-15T17:16:31.000Z","updated_at":"2019-05-02T13:53:35.000Z","dependencies_parsed_at":"2022-09-07T07:10:47.670Z","dependency_job_id":null,"html_url":"https://github.com/kianmeng/webservice-swapi","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/kianmeng/webservice-swapi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kianmeng%2Fwebservice-swapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kianmeng%2Fwebservice-swapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kianmeng%2Fwebservice-swapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kianmeng%2Fwebservice-swapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kianmeng","download_url":"https://codeload.github.com/kianmeng/webservice-swapi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kianmeng%2Fwebservice-swapi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273100652,"owners_count":25045699,"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-09-01T02:00:09.058Z","response_time":120,"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","cpan","perl","star-wars"],"created_at":"2024-12-11T06:08:29.593Z","updated_at":"2025-09-01T09:37:40.411Z","avatar_url":"https://github.com/kianmeng.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Cpan license](https://img.shields.io/cpan/l/WebService-Swapi.svg)](https://metacpan.org/release/WebService-Swapi)\n[![Cpan version](https://img.shields.io/cpan/v/WebService-Swapi.svg)](https://metacpan.org/release/WebService-Swapi)\n\n# NAME\n\nWebService::Swapi - Perl library for accessing the Star Wars data,\nhttp://swapi.co\n\n# SYNOPSIS\n\n    use WebService::Swapi;\n\n    $swapi = WebService::Swapi-\u003enew;\n\n    # Check if API server is up\n    my $resources = $swapi-\u003eping();\n\n    # Get information of all available resources\n    my $resources = $swapi-\u003eresources();\n\n    # View the JSON schema for people resource\n    my $schema = $swapi-\u003eschema('people');\n\n    # Searching\n    my $results = $swapi-\u003esearch('people', 'solo');\n\n    # Get resource item\n    my $item = $swapi-\u003eget_object('films', '1');\n\n# DESCRIPTION\n\nWebService::Swapi is a Perl client helper library for the Star Wars API (swapi.co).\n\n# DEVELOPMENT\n\nSource repository at [https://github.com/kianmeng/webservice-swapi](https://github.com/kianmeng/webservice-swapi).\n\n## Docker\n\nIf you have Docker installed, you can build your Docker container for this\nproject.\n\n    $ docker build -t webservice-swapi .\n    $ docker run -it -v $(pwd):/root webservice-swapi bash\n    # cpanm --installdeps --notest .\n\n## Milla\n\nSetting up the required packages.\n\n    $ milla authordeps --missing | cpanm\n    $ milla listdeps --missing | cpanm\n\nCheck you code coverage.\n\n    $ milla cover\n\nSeveral ways to run the test.\n\n    $ milla test\n    $ milla test --author --release\n    $ AUTHOR_TESTING=1 RELEASE_TESTING=1 milla test\n    $ AUTHOR_TESTING=1 RELEASE_TESTING=1 milla run prove t/01_instantiation.t\n\nRelease the module.\n\n    $ milla build\n    $ milla release\n\n# METHODS\n\n## new(\\[%$args\\])\n\nConstruct a new WebService::Swapi instance. Optionally takes a hash or hash reference.\n\n    # Instantiate the class.\n    my $swapi = WebService::Swapi-\u003enew;\n\n### api\\_url\n\nThe URL of the API resource.\n\n    # Instantiate the class by setting the URL of the API endpoints.\n    my $swapi = WebService::Swapi-\u003enew({api_url =\u003e 'http://example.com/api/'});\n\n## get\\_object($object, \\[$format\\])\n\nGet full details of a object or resource. Optionally takes a returned format.\n\n    # Get the details of different available object using id.\n    my $object = $swapi-\u003eget_object('films', '1');\n\n    # Get the result in different format.\n    my $object_json = $swapi-\u003eget_object('films', '1', 'json');\n    my $object_wookie = $swapi-\u003eget_object('films', '1', 'wookiee');\n\n## ping()\n\nCheck if the API service or server is responding to a request.\n\n    my $server_status = $swapi-\u003eping();\n\n## resources(\\[$format\\])\n\nList down all the available objects. Optionally takes a returned format.\n\n    # Get all available resources or objects.\n    my $resources = $swapi-\u003eresources();\n\n    # Similarly but in different format.\n    my $resources_json = $swapi-\u003eresources('json');\n    my $resources_wookie = $swapi-\u003eresources('wookie');\n\n## schema($object)\n\nShow the data structure of a resource or object.\n\n    # Get the schema / structure of a resource or object.\n    my $schema = $swapi-\u003eschema('people');\n\n## search($object, $keyword, \\[$format\\])\n\nSearching by keywords. Takes both an object and keywords. Optionally takes a returned format.\n\n    # Search a resource or object by keywords.\n    my $results = $swapi-\u003esearch('people', 'solo');\n\n    # Or in different format.\n    my $results = $swapi-\u003esearch('people', 'solo', 'json');\n    my $results = $swapi-\u003esearch('people', 'solo', 'wookiee');\n\n# AUTHOR\n\nKian-Meng, Ang \u003ckianmeng@cpan.org\u003e\n\n# COPYRIGHT AND LICENSE\n\nThis software is Copyright (c) 2017 by Kian Meng, Ang.\n\nThis is free software, licensed under:\n\n    The Artistic License 2.0 (GPL Compatible)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkianmeng%2Fwebservice-swapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkianmeng%2Fwebservice-swapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkianmeng%2Fwebservice-swapi/lists"}