GithubHelp home page GithubHelp logo

Comments (11)

Templarian avatar Templarian commented on June 2, 2024

@penn5 Just to preface the API is only for contributors building or extending the website. All of the data is provided in the meta.json (the public website uses that data and not the API).

With that said if you're building features for the site the API is at https://dev.materialdesignicons.com/api/ You probably forgot the subfolder (this is moving to https://api.pictogrammers.com/*, but we're still working on that after a few more site features go out.

from pictogrammers.com.

mririgoyen avatar mririgoyen commented on June 2, 2024

Yep, what @Templarian said. 😄 We would be really interesting in what you're currently using the API for. If you're using it for something not related to the site and need help transitioning to using the meta.json files, please let us know.

from pictogrammers.com.

penn5 avatar penn5 commented on June 2, 2024

I'm using the API to automatically check for updates to icons in my android app. I grab all the metadata from meta.json and just use the API for exports.

from pictogrammers.com.

penn5 avatar penn5 commented on June 2, 2024

https://dev.materialdesignicons.com/api/packages returns 404... The same error for https://dev.materialdesignicons.com/api/download/icon/vectordrawable/93D7B6DC-17D2-4A2B-B787-79E2E8BEF304.

I got the earlier error not because I missed out the /api but because I wasn't using the dev. prefix (this used to work).

from pictogrammers.com.

mririgoyen avatar mririgoyen commented on June 2, 2024

This doesn't sound like an appropriate use case for the API. When we release new versions of the package, simply update and the meta.json will have the latest changes. Additionally, you can easily generate a Vector Drawable using the path data.

from pictogrammers.com.

penn5 avatar penn5 commented on June 2, 2024

I don't see the problem with using the API for this - it only takes place at build time just before a release and I make about 10-20 requests. That probably averages at one request per day, maximum. I know I can generate the drawable from a path, but where should I get this path data? Either by parsing the SVGs in https://github.com/Templarian/MaterialDesign (very ugly) or from the API (broken).

Whatever the problems with my use case, the issue still exists.

from pictogrammers.com.

Templarian avatar Templarian commented on June 2, 2024

@penn5 The JSDelivr CDN is exactly what you would need. Our third party guide describes best practices for obtaining this data. These releases are always stable and up to date with latest.

We'll be implementing API keys eventually, so relying on the private site API will eventually break.

from pictogrammers.com.

mririgoyen avatar mririgoyen commented on June 2, 2024

I don't see the problem with using the API for this.

The problem is that it goes against our wishes. The documentation link you shared in the very first post explicitly states:

Please do not use these endpoints to scrape the site or to build third party applications. All data is provided in the meta.json on the CDN or in the GitHub repo after every release.

Unfortunately, that means we aren't going to provide assistance to you in figuring out how to consume it. As Templarian stated, we're in planning stages to implement API keys to prevent just this type of behavior, which means even if you figure it out, it will permanently break for you soonish. It's really in your best interest to utilize the static assets (e.g. meta.json) or the CDN.

from pictogrammers.com.

penn5 avatar penn5 commented on June 2, 2024

I did switch to the CDN. I think you should a) make more clear on the documentation how this is used, for people who aren't familiar with Javascript packages, and b) fix your API for anyone who is a valid user (since it doesn't seem to work).

It would also be nice to be able to fetch the raw path data, rather than having to parse the SVG files.

from pictogrammers.com.

mririgoyen avatar mririgoyen commented on June 2, 2024

It would also be nice to be able to fetch the raw path data, rather than having to parse the SVG files.

Raw path data is available via @mdi/js if you're using JavaScript to do your scripting.

from pictogrammers.com.

penn5 avatar penn5 commented on June 2, 2024

Raw path data is available via @mdi/js if you're using JavaScript to do your scripting.

I'm not.

from pictogrammers.com.

Related Issues (20)

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.