Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nucleos/nucleoslastfmbundle

🔌 This bundle provides services for using the last.fm API with symfony.
https://github.com/nucleos/nucleoslastfmbundle

api bundle hacktoberfest lastfm php symfony symfony-bundle webservice-client

Last synced: about 1 month ago
JSON representation

🔌 This bundle provides services for using the last.fm API with symfony.

Awesome Lists containing this project

README

        

NucleosLastFmBundle
===================
[![Latest Stable Version](https://poser.pugx.org/nucleos/lastfm-bundle/v/stable)](https://packagist.org/packages/nucleos/lastfm-bundle)
[![Latest Unstable Version](https://poser.pugx.org/nucleos/lastfm-bundle/v/unstable)](https://packagist.org/packages/nucleos/lastfm-bundle)
[![License](https://poser.pugx.org/nucleos/lastfm-bundle/license)](https://packagist.org/packages/nucleos/lastfm-bundle)

[![Total Downloads](https://poser.pugx.org/nucleos/lastfm-bundle/downloads)](https://packagist.org/packages/nucleos/lastfm-bundle)
[![Monthly Downloads](https://poser.pugx.org/nucleos/lastfm-bundle/d/monthly)](https://packagist.org/packages/nucleos/lastfm-bundle)
[![Daily Downloads](https://poser.pugx.org/nucleos/lastfm-bundle/d/daily)](https://packagist.org/packages/nucleos/lastfm-bundle)

[![Continuous Integration](https://github.com/nucleos/NucleosLastFmBundle/actions/workflows/continuous-integration.yml/badge.svg?event=push)](https://github.com/nucleos/NucleosLastFmBundle/actions?query=workflow%3A"Continuous+Integration"+event%3Apush)
[![Code Coverage](https://codecov.io/gh/nucleos/NucleosLastFmBundle/graph/badge.svg)](https://codecov.io/gh/nucleos/NucleosLastFmBundle)
[![Type Coverage](https://shepherd.dev/github/nucleos/NucleosLastFmBundle/coverage.svg)](https://shepherd.dev/github/nucleos/NucleosLastFmBundle)

This bundle provides a wrapper for using the [Last.fm API] inside symfony.

## Installation

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

```
composer require nucleos/lastfm-bundle
# To define a default http client and message factory
composer require symfony/http-client nyholm/psr7
```

### Enable the Bundle

Then, enable the bundle by adding it to the list of registered bundles in `config/bundles.php` file of your project:

```php
// config/bundles.php

return [
// ...
Nucleos\LastFmBundle\NucleosLastFmBundle::class => ['all' => true],
];
```

### Configure the Bundle

Define the API credentials in your configuration.

```yaml
# config/packages/nucleos_lastfm.yaml

nucleos_lastfm:
api:
app_id: "%lastfm_api.id%"
shared_secret: "%lastfm_api.secret%"

http:
client: 'httplug.client'
message_factory: 'nyholm.psr7.psr17_factory'
```

## License

This bundle is under the [MIT license](LICENSE.md).

[Last.fm API]: http://www.last.fm/api