GithubHelp home page GithubHelp logo

canonicalwebteam.store-api's Introduction

Canonical Store Api - Python package

Test live APIs Tests Publish Code coverage

How to install

To install this extension as a requirement in your project, you can use PIP:

pip install canonicalwebteam.store-api

See also the documentation for pip install.

Development

The package leverages poetry for dependency management.

Testing

All tests can be run with poetry run python3 -m unittest discover tests.

Note: You might have to do poetry install before runnning the command above.

canonicalwebteam.store-api's People

Contributors

abbiesims avatar anthonydillon avatar codeempress1 avatar jkfran avatar lukewh avatar m7mdisk avatar nottrobin avatar petesfrench avatar renovate-bot avatar solazio avatar steverydz avatar tbille avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

canonicalwebteam.store-api's Issues

Size and page parameters not working as expected

The get_publisher_items method allows to specify the number of items that we want with the size parameter.

https://github.com/canonical-web-and-design/canonicalwebteam.store-api/blob/d320d727519555003c2a54b46d1fd15c30018b52/canonicalwebteam/store_api/store.py#L112-L118

It turns out the Snapcraft API will ignore the size parameter when getting snaps from a specific publisher.

This is an example URL, as we can see we have specified size=2 but we will get all the snaps from this publisher:
https://api.snapcraft.io/api/v1/snaps/search?q=publisher:28zEonXNoBLvIB7xneRbltOsp0Nf7DwS&size=2&page=1&scope=wide&arch=wide&confinement=strict,classic&fields=package_name

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: undefined

Change publisher parameter in get_publisher_items

What's this hash-like string? Is that an identifier for the publisher? Or an actual publisher's name?

If it's a hash of some sort, I think the argument name should be changed to make this clearer. But again, that should be out of scope for this PR, as it makes sense to just focus on testing in this PR.

Originally posted by @nottrobin in #6

Fix live tests

We shouldn't be searching for snaps called "toto" to test the search method because the number of results are going to be continually changing.

Originally posted by @jkfran in #25

Update API URL

The API needs to consume api.charmhub.io instead of api.snapcraft.io as it will stop working for charms.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.