{"id":36399229,"url":"https://github.com/yugo412/blogger","last_synced_at":"2026-01-11T16:01:47.234Z","repository":{"id":57088426,"uuid":"169607216","full_name":"yugo412/blogger","owner":"yugo412","description":"Unoffical Blogger (REST API) package for Laravel","archived":false,"fork":false,"pushed_at":"2019-02-11T21:40:10.000Z","size":23,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-23T02:53:03.057Z","etag":null,"topics":["blog","blogger","blogspot","laravel","php"],"latest_commit_sha":null,"homepage":"http://blogger.aplikasi.live","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/yugo412.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}},"created_at":"2019-02-07T16:55:47.000Z","updated_at":"2023-04-25T14:19:15.000Z","dependencies_parsed_at":"2022-08-20T16:00:40.625Z","dependency_job_id":null,"html_url":"https://github.com/yugo412/blogger","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/yugo412/blogger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yugo412%2Fblogger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yugo412%2Fblogger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yugo412%2Fblogger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yugo412%2Fblogger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yugo412","download_url":"https://codeload.github.com/yugo412/blogger/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yugo412%2Fblogger/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28312141,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T14:58:17.114Z","status":"ssl_error","status_checked_at":"2026-01-11T14:55:53.580Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["blog","blogger","blogspot","laravel","php"],"created_at":"2026-01-11T16:01:38.035Z","updated_at":"2026-01-11T16:01:47.214Z","avatar_url":"https://github.com/yugo412.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Blogger API for Laravel\nUnoffical Blogger (REST API) package for Laravel.\n\n## Features\n\n- Get blog information.\n- Retrieve posts.\n- Retrieve post by ID or path.\n- Search posts. \n- Retrieve pages.\n- Retrieve single page.\n\n## Installation\n\nAdd Blogger package to your Laravel application by running command:\n\n```\ncomposer require yugo/blogger\n```\n\n## Configuration\n\nIf you are using Laravel 5.5 and upper, provider is automatically registered using auto package discovery from Laravel. If you get error to indicate provider not found, you can register new provider via `config/app.php` file.\n\n```\n/*\n * Package Service Providers...\n */\nYugo\\Blogger\\BloggerServiceProvider::class,\n```\n\nYou can set up alias for Blogger package from the same config file.\n\n```\n// facade alias\n'Blogger' =\u003e Yugo\\Blogger\\Facades\\Blogger::class,\n```\n\nBefore using `Blogger` facade, you must provide API key and full URL from your blog. API Key can be generated via [this url](https://developers.google.com/blogger/docs/3.0/using#APIKey).\n\nAdd two configs called `key` and `url` to file `config/services.php`.\n\n```\n'blogger' =\u003e [\n    'key' =\u003e env('BLOGGER_KEY'),\n    'url' =\u003e env('BLOGGER_URL', 'https://yourblog.blogspot.com'),\n],\n```\n\nFor security reason, you can define `blogger.key` and `blogger.url` config from `.env` file using sample below.\n\n```\nBLOGGER_KEY=\"secret-api-key\"\nBLOGGER_URL=\"https://yourblog.blogspot.com\"\n```\n\n## Usage\n\nBefore retrieving posts, pages, and comments, you must know your blog id first. To retrieve blog id data, you can use `blog` method from `Blogger` facade. For example:\n\n```\n$blog = Blogger::blog();\n```\n\n\n\n## Available Methods\n\n```php\n$blog = Blogger::blog();\n\n\n// retrieving posts\n$posts = Blogger::posts($blog['id']);\n$posts = Blogger::search($keyword, $blogId);\n$post = Blogger::postById($postId, $blogId);\n$post = Blogger::postByPath($path, $blogId);\n\n// retrieving pages\n$pages = Blogger::pages($blog['id']);\n$page = Blogger::page($pageId, $blogId);\n```\n\nIf you want to include images in post, you can chain method `withImages(bool $withImages = true)`, for example:\n\n```php\n$posts = Blogger::withImages()-\u003eposts();\n```\n\n## Best Practice\nWhen you retrieving posts or pages, you must define blog id in every method. If you only have one blog and static blog id, you can follow this sample code for best practice.\n```php\n\u003c?php\n\nnamespace App\\Http\\Controllers;\n\nuse Illuminate\\Http\\JsonResponse;\nuse Illuminate\\Support\\Facades\\Cache;\nuse Illuminate\\Http\\Request;\nuse Yugo\\Blogger\\Facades\\Blogger;\n\nclass BloggerController extends Controller\n{\n    /**\n     * @var Blogger\n     */\n    private $blogger;\n\n    public function __construct()\n    {\n        $blog = Cache::remember('blogger.blog', now()-\u003eaddDays(7), function (){\n           return Blogger::blog();\n        });\n\n        abort_if(empty($blog), 404, __('Blog not found.'));\n\n        $this-\u003eblogger = Blogger::setBlog($blog['id']);\n    }\n\n    /**\n     * @return JsonResponse\n     */\n    public function blog(): JsonResponse\n    {\n        return response()-\u003ejson($this-\u003eblogger-\u003eblog());\n    }\n\n    /**\n     * @return JsonResponse\n     */\n    public function posts(): JsonResponse\n    {\n        return response()-\u003ejson($this-\u003eblogger-\u003eposts());\n    }\n\n    /**\n     * @param string $id\n     * @return JsonResponse\n     */\n    public function post(string $id): JsonResponse\n    {\n        return response()-\u003ejson($this-\u003eblogger-\u003epostById($id));\n    }\n\n    /**\n     * @param string $id\n     * @return JsonResponse\n     */\n    public function comments(string $id): JsonResponse\n    {\n        return response()-\u003ejson($this-\u003eblogger-\u003ecomments($id));\n    }\n\n    /**\n     * @param string $post\n     * @param string $comment\n     * @return JsonResponse\n     */\n    public function comment(string $post, string $comment): JsonResponse\n    {\n        return response()-\u003ejson($this-\u003eblogger-\u003ecomment($comment, $post));\n    }\n\n    /**\n     * @param Request $request\n     * @return JsonResponse\n     */\n    public function search(Request $request): JsonResponse\n    {\n        $this-\u003evalidate($request, [\n            'keyword' =\u003e ['required', 'string'],\n        ]);\n\n        return response()-\u003ejson($this-\u003eblogger-\u003esearch($request-\u003ekeyword));\n    }\n\n    /**\n     * @return JsonResponse\n     */\n    public function pages(): JsonResponse\n    {\n        return response()-\u003ejson($this-\u003eblogger-\u003epages());\n    }\n\n    /**\n     * @param string $id\n     * @return JsonResponse\n     */\n    public function page(string $id): JsonResponse\n    {\n        return response()-\u003ejson($this-\u003eblogger-\u003epage($id));\n    }\n}\n```\n\nNext, you can define routes like this example in case you want access it directly via browser.\n\n```php\nRoute::get('blogger/blog', 'BloggerController@blog');\nRoute::get('blogger/posts', 'BloggerController@posts');\nRoute::get('blogger/post/{id}', 'BloggerController@post');\nRoute::get('blogger/post/{id}/comments', 'BloggerController@comments');\nRoute::get('blogger/post/{post}/comment/{comment}', 'BloggerController@comments');\nRoute::get('blogger/search', 'BloggerController@search');\nRoute::get('blogger/pages', 'BloggerController@pages');\nRoute::get('blogger/page/{id}', 'BloggerController@page');\n```\n\n## Demo \u0026 Sample Code\n\nFull running application can be found at [blogger.aplikasi.live](http://blogger.aplikasi.live). You can look at the code from this [repository](https://github.com/arvernester/blogger-demo).\n\n## License\n\nMIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyugo412%2Fblogger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyugo412%2Fblogger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyugo412%2Fblogger/lists"}