GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - MacroMan/nitropack-api

This repository was archived by the owner on Dec 19, 2023. It is now read-only.
BranchesTags
Open more actions menu

Latest commit

 

History

4 Commits
4 Commits

Folders and files

NameName
Last commit message
Last commit date
src/NitroPack
src/NitroPack
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
composer.json
composer.json
 
 
composer.lock
composer.lock
 
 
test.php
test.php
 
 

Repository files navigation

Unofficial NitroPack API SDK

This repo is mainly based on https://nitropack.io/download/plugin/nitropack-php-sdk-limited-support with some areas tidied up and refactored to allow composer installation.

Installation

composer require macroman/nitropack-api

Usage

use NitroPack\NitroPack;
use NitroPack\PurgeType;

// Initialize API
$nitro = new NitroPack('site_id', 'secret');

// Clear entire cache
$nitro->purgeCache();

// Clear specific URL
$nitro->purgeCache('https://example.com/');

// Clear tagged pages
$nitro->purgeCache(null, 'tag-name');

// Clear cache leaving a reason (shows in WordPress settings page)
$nitro->purgeCache(null, null, PurgeType::COMPLETE, 'This is my reason');

// Add a tag to a URL
$nitro->tagUrl('https://example.com/', 'tag-name');

// Enable/disable compression
$nitro->enableCompression();
$nitro->disableCompression();

More functionality available, but not documented. Look at NitroPack\NitroPack.php for more information.

About

No description, website, or topics provided.

Resources

Readme
Activity

Stars

3 stars

Watchers

1 watching

Forks

3 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.