1.0.4 • Published 8 months ago

civitai-api-wrapper v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

Civitai API Wrapper

This is a Node.js wrapper for the Civitai API, allowing you to interact with Civitai's services programmatically from your Node.js applications.

Installation

To use this wrapper in your Node.js project, you can install it via npm or yarn: Installation requires Node.js 10.9.0 or higher.

NPM Known Vulnerabilities HitCount

npm install civitai-api-wrapper
# or
yarn add civitai-api-wrapper

# latest
npm install civitai-api-wrapper@latest
const CivitaiAPI = require('civitai-api-wrapper');

const civitai = new CivitaiAPI();

// Example: Fetch a list of creators
civitai.getCreators()
  .then(creators => {
    console.log('Creators:', creators);
  })
  .catch(error => {
    console.error('Error:', error.message);
  });

Methods

getCreators(options)

Fetch a list of creators.

getImages(options)

Fetch a list of images.

getModels(options)

Fetch a list of models.

getModelById(modelId)

Fetch a model by its ID.

getModelVersionById(modelVersionId)

Fetch a model version by its ID.

getModelVersionByHash(hash)

Fetch a model version by its hash.

getTags(options)

Fetch a list of tags.

Contributing

Contributions Welcome!

If you'd like to contribute to this wrapper or add new features, please follow these steps:

  1. Open an issue to discuss the proposed changes or improvements.

  2. Fork the repository on GitHub.

  3. Create a new branch for your feature or bug fix.

  4. Implement your changes and write tests if applicable.

  5. Ensure that your code follows best practices and is well-documented.

  6. Test your changes thoroughly.

  7. Create a pull request (PR) with a clear description of the changes you've made.

  8. Your PR will be reviewed, and any necessary feedback will be provided.

  9. Once your PR is approved, it will be merged into the main branch.

Thank you for contributing to this project!

Examples

See src/examples/ .

1.0.4

8 months ago

1.0.3

8 months ago

1.0.2

8 months ago

1.0.0

8 months ago