Socket
Book a DemoInstallSign in
Socket

yandex_tracker

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yandex_tracker

0.1.0
bundlerRubygems
Version published
Maintainers
1
Created
Source

YandexTracker

Ruby API client for YandexTracker with partially implemented resources for essential needs

Installation

Install the gem and add to the application's Gemfile by executing:

$ bundle add yandex_tracker

If bundler is not being used to manage dependencies, install the gem by executing:

$ gem install yandex_tracker

Configure

  YandexTracker.configure do |config|
    config.client_id = "abc"
    config.client_secret = "def"
    config.org_id = "123" # or cloud_org_id
  end

  YandexTracker::Auth.exchange_code(code)

  # or

  YandexTracker.configure do |config|
    config.access_token = "xyz"
    config.org_id = "123" # or cloud_org_id
  end

Usage

  client = YandexTracker::Client.new

  client.users.myself

  client.workflows.list
  client.resolutions.list

  myqueue = client.queues.create(
    key: "MYQUEUE",
    name: "MYQUEUE",
    lead: "me", # should have correct name
    defaultType: "task",
    defaultPriority: "normal",
    issueTypesConfig: {
      issueType: "task",
      workflow: "developmentPresetWorkflow",
      resolutions: ["wontFix"]
    }
  ) #<YandexTracker::Objects::Queue>

  myqueue.issues #<YandexTracker::Collections::Issues>

  issue = myqueue.issues.create(summary: "zxc")
  comment = issue.comments.create(text: "ok")

  issue.attachments.create(File.open("Screenshot.png"))

  unattached_file = client.attachments.create(File.open("Screenshot.png"))
  comment.create(text: "More details", attachmentIds: [temp_attachment.id])

  issue.transitions.list
  issue.transition('wont_fix', comment: 'wae')
  issue.transition('reopen', comment: 'no')
  issue.transition('close', resolution: 'wontFix')

  client.issues.list
  client.issues(queue: "MYQUEUE").list
  attachments = client.attachments(issue: "MYQUEUE-1").list
  attachments.first.download

  client.comments(issue: "MYQUEUE-1").create(text: "hello")

  issue = client.issues.search({
    filter: { queue: "TEST", status: "open"}},
    expand: "attachments"
  ).first

  issue.createdBy
  issue.createdBy.expand

  issue.attachments
  issue.data

  client.issues.import({
    queue: "TEST",
    summary: "Test",
    createdAt: "2017-08-29T12:34:41.740+0000",
    createdBy: "username",
    ...
  })

  client.categories.list
  client.categories.create(
    name: { en: "My Category", ru: "Моя Категория" },
    order: 1
  )

  client.fields.create(
    name: { en: "My Field", ru: "Моe поле" },
    id: "myglobalfield",
    type: "ru.yandex.startrek.core.fields.StringFieldType",
    category: "0000000000000003********"
  )

  myqueue.local_fields.list
  myqueue.local_fields.create(
    name: { en: "My Field", ru: "Моe поле" },
    id: "myglobalfield",
    category: "0000000000000003********",
    type: "ru.yandex.startrek.core.fields.StringFieldType"
  )

License

The gem is available as open source under the terms of the MIT License.

FAQs

Package last updated on 15 Jan 2025

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.