Skip to content

Instantly share code, notes, and snippets.

View alex-devdone's full-sized avatar

Alex S alex-devdone

View GitHub Profile
#### 3.5 Get events list (from version 0.2.3)
##### GET /events?start=1459964225556&end=1460137025556
Query params:
```sh
start - start date as timestamp - (new Date()).getTime()
end - end date as timestamp - (new Date()).getTime()
```
Response (status: 200):
1)// Logics using Promises
function sendSmsCustom (params, provider){
var deferred = q.defer();
var data; // value for store validated params
validateCustomSmsParams(params)
.then(function(validated){
data = validated;
return findDataByPrefixAndId(data.prefix, data.id)
})
<script src="/js/jquery-ui-1.10.3.custom/js/jquery-1.9.1.min.js"></script>
<script src="/js/jquery-ui-1.10.3.custom/js/jquery-ui-1.10.3.custom.min.js"></script>
<script>
$(document).ready(function (){
$('.autosuggest').autocomplete({
source: function(request, response){
$.getJSON($(this)[0].element.attr('data-source')+"/"+ encodeURIComponent(request.term),response);
}, // Страница для обработки запросов автозаполнения
minLength: 2, // Минимальная длина запроса для срабатывания автозаполнения
zIndex: 99999,
import isomorphicFetch from 'isomorphic-fetch';
import {getStore} from '../store/configureStore';
import * as types from '../actions/types';
const baseUrl = __CLIENT__ ? __CONFIG__.api.url : __CONFIG__.server.url;
function getAuthHeader() {
const user = getStore().getState().currentUser;
if (user && user.token){
return getStore().getState().currentUser.token;