#!/bin/bash

tokens_file='/etc/direct-tokens/api_test_tokens'
client_login='lamodasem'
operator_login='at-direct-super'
oauth_token=$(grep $operator_login $tokens_file |awk '{print $2}')


SCRIPTPATH=`readlink -f $0`
SCRIPTDIR=`dirname $SCRIPTPATH`

source $SCRIPTDIR/beta_number

SERVICE_URL="$JSON_URL/bids"

curl \
     -k \
    -H "Authorization: Bearer $oauth_token" \
    -H 'Accept-Language: da, en-gb;q=0.8, ru;q=0.6, en;q=0.7' \
    -H "Client-Login: $client_login" \
    -d '
  {
    "method":"get",
    "params": {
        "SelectionCriteria" : {
            "KeywordIds" : [ 123 ]
        },
        "FieldNames" : [
            "KeywordId",
            "Bid"
        ]
    }
  }' \
    "$SERVICE_URL"

echo
