New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@octopusdeploy/api-client

Package Overview
Dependencies
Maintainers
4
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@octopusdeploy/api-client

TypeScript API client for Octopus Deploy

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.7K
increased by4.44%
Maintainers
4
Weekly downloads
 
Created
Source

api-client.ts

TypeScript API client for Octopus Deploy ✨🐙🚀✨

Usage

import type { ProjectResource } from '@octopusdeploy/message-contracts';
import { Client, ClientConfiguration, Repository } from '@octopusdeploy/api-client';

const configuration: ClientConfiguration = {
  // agent: new Agent({ proxy: { hostname: '127.0.0.1', port: 8866 } }), // proxy agent if required
  apiKey: '<api-key>',
  apiUri: '<api-uri>',
  space: '<space-id>',
};

const client = await Client.NewClient(configuration);
const repository = new Repository(client);
const projectNameOrId: string = '<project-name-or-ID>';

let project: ProjectResource | undefined;

try {
  console.log(`Getting project, "${projectNameOrId}"...`);
  project = await repository.projects.find(projectNameOrId);
} catch (error) {
  console.error(error);
}

if (project !== null && project !== undefined) {
  console.log(`Project found: "${project?.Name}" (${project?.Id})`);
} else {
  console.error(`Project, "${projectNameOrId}" not found`);
}

Keywords

FAQs

Package last updated on 26 Oct 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc