@@ -60,10 +60,10 @@ protected Stack(String stackApiKey) {
6060 }
6161
6262 protected void setConfig (Config config ){
63- this .config = config ;
64- URLSCHEMA = config .URLSCHEMA ;
65- URL = config .URL ;
66- VERSION = config .VERSION ;
63+ this .config = config ;
64+ URLSCHEMA = config .URLSCHEMA ;
65+ URL = config .URL ;
66+ VERSION = config .VERSION ;
6767
6868 if (!config .environment .isEmpty ()){
6969 setHeader ("environment" , config .environment );
@@ -90,8 +90,11 @@ public ContentType contentType(String contentTypeName){
9090 }
9191
9292
93-
94-
93+ /**
94+ * Takes asset uid as a parameter and returns @{@link Asset} instance
95+ * @param uid uid of {@link Asset}
96+ * @return Asset instance
97+ */
9598 public Asset asset (String uid ){
9699 Asset asset = new Asset (uid );
97100 asset .setStackInstance (this );
@@ -106,33 +109,55 @@ protected Asset asset(){
106109 return asset ;
107110 }
108111
109-
110-
112+ /**
113+ * assetLibrary returns AssetLibrary instance
114+ * @return @{@link AssetLibrary}
115+ */
111116 public AssetLibrary assetLibrary (){
112117 AssetLibrary library = new AssetLibrary ();
113118 library .setStackInstance (this );
114-
115119 return library ;
116120 }
117121
118122
119-
123+ /**
124+ * Returns apiKey of particular stack
125+ * @return @{@link String} stack api key
126+ */
120127 public String getApplicationKey (){ return stackApiKey ;}
121128
122129
123-
130+ /**
131+ * Returns accessToken of particular stack
132+ * @return @{@link String} access token of particular stack
133+ */
124134 public String getAccessToken (){ return localHeader != null ? (String )localHeader .get ("access_token" ) : null ;};
125135
126136
127-
137+ /**
138+ * Removes Header by key
139+ * @param key @{@link String} header key
140+ * <br><br><b>Example :</b><br>
141+ * stack.removeHeader("delivery_token");
142+ * <br><br>
143+ * </p>
144+ */
128145 public void removeHeader (String key ){
129146 if (!key .isEmpty ()){
130147 localHeader .remove (key );
131148 }
132149 }
133150
134151
135-
152+ /**
153+ * Adds header to the stack by key and value
154+ * @param key @{@link String} header key
155+ * @param value @{@link String} header value
156+ * <p>
157+ * Example
158+ * stack.setHeader("delivery_token","blt843748744");
159+ * </p>
160+ */
136161 public void setHeader (String key , String value ) {
137162 if (!key .isEmpty () && !value .isEmpty ()) {
138163 localHeader .put (key , value );
0 commit comments