Completed
Push — master ( 8f57d3...e59148 )
by Nikolai
03:08
created

Project::getInfo()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 5
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
/**
3
 * Crowdin API implementation in PHP.
4
 *
5
 * @copyright  Copyright (C) 2016 Nikolai Plath (elkuku)
6
 * @license    GNU General Public License version 2 or later
7
 */
8
9
namespace ElKuKu\Crowdin\Package;
10
11
use ElKuKu\Crowdin\Package;
12
13
/**
14
 * Class Project
15
 *
16
 * @since  1.0.5
17
 */
18
Class Project extends Package
19
{
20
	/**
21
	 * Get Crowdin Project details.
22
	 *
23
	 * @since 1.0.5
24
	 * @see   https://crowdin.com/page/api/info
25
	 *
26
	 * @return \Psr\Http\Message\ResponseInterface
27
	 */
28
	public function getInfo()
29
	{
30
		return $this->getHttpClient()
31
			->post($this->getBasePath('info'));
32
	}
33
34
	/**
35
	 * Delete Crowdin project with all translations.
36
	 *
37
	 * @since 1.0.5
38
	 * @see   https://crowdin.com/page/api/delete-project
39
	 *
40
	 * @return \Psr\Http\Message\ResponseInterface
41
	 */
42
	public function delete()
43
	{
44
		return $this->getHttpClient()
45
			->get($this->getBasePath('delete-project'));
46
	}
47
}
48