Skip to content

Commit c8fe2a7

Browse files
Assets query
1 parent ef9b7dd commit c8fe2a7

21 files changed

+68472
-11
lines changed

lib/config/index.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@
1313
// URL's relevant constants
1414
define('CONTENT_TYPES', '/content_types/');
1515
define('ENTRIES', '/entries/');
16+
define('ASSETS', '/assets/');
1617
define('ENVIRONMENTS', '/environments/');

lib/src/models/asset.php

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<?php
2+
/*
3+
* Dependency loading
4+
* */
5+
namespace Contentstack\Stack\Asset;
6+
7+
use Contentstack\Utility;
8+
9+
require_once __DIR__.'/base_query.php';
10+
11+
12+
/*
13+
* Class Asset
14+
* */
15+
class Asset {
16+
var $operation;
17+
var $assetUid = '';
18+
var $stack = '';
19+
20+
21+
/*
22+
* Asset
23+
* Asset Class to initalize your Asset
24+
* @param
25+
* Asset_UId - valid Asset uid
26+
* */
27+
public function __construct($asset_uid = '', $stack = '') {
28+
29+
$this->stack = $stack;
30+
$this->assetUid = $asset_uid;
31+
32+
33+
}
34+
35+
/*
36+
* fetch
37+
* Fetch the specified assets
38+
* */
39+
public function fetch() {
40+
$this->operation = __FUNCTION__;
41+
return \Contentstack\Utility\request($this, 'asset');
42+
}
43+
44+
}

0 commit comments

Comments
 (0)