UNPKG

node-red-contrib-ssafy-meoseon

Version:
156 lines (150 loc) 4.75 kB
<script type="text/html" data-template-name="naver-books"> <div class="form-row"> <label for="node-input-name"> <i class="fa fa-tag"></i> Name </label> <input type="text" id="node-input-name" data-i18n="[placeholder]Name" /> </div> <div class="form-row"> <label for="node-input-creds"> <i class="fa fa-key fa-fw"></i> API Key </label> <input type="text" id="node-input-creds" /> </div> <div class="form-row"> <label> <i class="fa fa-file-text-o fa-fw"></i> Return Type </label> <select type="text" id="node-input-returnType" style="width:70%!important;"> <option value="json" selected>JSON</option> <option value="xml">XML</option> </select> </div> <div class="form-row"> <label for="node-input-query"> <i class="fa fa-search fa-fw"></i> Query </label> <input type="text" id="node-input-query" data-i18n="[placeholder]word1,word2,word3..." /> </div> <div class="form-row"> <label> <i class="fa fa-cog fa-fw"></i> Option </label> <select type="text" id="node-input-sort" style="width:70%!important;"> <option value="sim">sim</option> <option value="date">date</option> <option value="count">count</option> </select> </div> <div class="form-row"> <label for="node-input-start"> <i class="fa fa-play fa-fw"></i> Start </label> <input type="text" id="node-input-start" data-i18n="[placeholder]1 ~ 1000" /> </div> <div class="form-row"> <label for="node-input-display"> <i class="fa fa-list fa-fw"></i> Display </label> <input type="text" id="node-input-display" data-i18n="[placeholder]10 ~ 100" /> </div> </script> <script type="text/html" data-help-name="naver-books"> <p>Summary of the node.</p> <h3>Inputs</h3> <dl class="message-properties"> <dt>API Key<span class="property-type">naver-books-api-key</span></dt> <dd>네이버 책 API Key</dd> <dt>Return Type<span class="property-type">select</span></dt> <dd>JSON/XML 형식 지원</dd> <dt>Query<span class="property-type">string</span></dt> <dd> 네이버 쇼핑에서 검색할 단어 입력. "," 로 구분하여 여러 단어 검색가능 </dd> <dt>Option<span class="property-type">select</span></dt> <dd> 검색 시 사용할 옵션 (sim: 유사도 순, date: 날짜 순, count: 판매량 순 </dd> <dt>Start<span class="property-type">integer</span></dt> <dd>검색 시작 위치 (1 ~ 1000)</dd> <dt>Display<span class="property-type">integer</span></dt> <dd>검색 결과 출력 건수 (10 ~ 100)</dd> </dl> <h3>Outputs</h3> <dl class="message-properties"> <dt>payload<span class="property-type">object</span></dt> <dd>네이버 쇼핑 검색 API에서 얻어온 결과 데이터 반환 (JSON/XML)</dd> </dl> <h3>Details</h3> <p>Explanation of the details.</p> <p><b>Note</b>: Note of the node.</p> </script> <script type="text/javascript"> RED.nodes.registerType('naver-books', { color: '#04cf5c', category: 'SASM Ecommerce Extensions Pack', defaults: { name: { value: 'Naver Books' }, returnType: { value: 'json', required: false }, query: { value: '', required: false }, display: { value: '10', required: false }, sort: { value: 'sim', required: false }, start: { value: '1', required: false }, creds: { value: '', type: 'naver-books-api-key', }, }, inputs: 1, outputs: 1, paletteLabel: 'Naver Books', icon: 'navershopping.png', label() { return this.name || 'Naver Books' }, }) </script> <script type="text/html" data-template-name="naver-books-api-key"> <div class="form-row"> <label for="node-input-name"> <i class="fa fa-tag fa-fw"></i> Name</label> <input type="text" id="node-config-input-name" placeholder="Name" /> </div> <div class="form-row"> <label for="node-config-input-clientId"> Client Id</label> <input type="text" id="node-config-input-clientId" placeholder="Client Id" /> </div> <div class="form-row"> <label for="node-config-input-clientSecret"> Client Secret</label> <input type="text" id="node-config-input-clientSecret" placeholder="Client Secret" /> </div> </script> <script type="text/javascript"> RED.nodes.registerType('naver-books-api-key', { category: 'config', defaults: { name: { value: 'Naver Books API Key' }, }, credentials: { clientId: {}, clientSecret: {}, }, paletteLabel: 'Naver Books API Key', label() { return this.name || 'Naver Shopping API Key' }, }) </script>