Alpaca slider not working - slider

I am trying to run alpaca slider but I am not able to use it in my project with property slider= true any idea how can I make it work using alpaca only. Is any specific version of alpaca needed for this to work?
I am using following code:
$(function() {
$("#field2").alpaca({
"data": 18,
"options": {
"type": "integer",
"label": "Snow Days:",
"helper": "Number of Snow Days in January 2011",
"slider": true
},
"schema": {
"minimum": 1,
"maximum": 31
}
});
});

welcome to Stackoverflow.
There are two solution for this, your code is correct but to show the slider for your component you should add jquery-ui to your page. The second solution is to add the property inputType in the options object.
/..
"options": {
"id": "test",
"type": "integer",
"label": "Snow Days:",
"helper": "Number of Snow Days in January 2011",
"inputType": "range",
},
/..

With jquery UI version 1.12.1 and jquery version 1.12.4
"inputType": "range" in options json is working for me. This should work for you.
$(function() {
$("#field2").alpaca({
"data": 18,
"options": {
"inputType": "range",
"label": "Snow Days:",
"helper": "Number of Snow Days in January 2011",
"slider": true
},
"schema": {
"minimum": 1,
"maximum": 31
}
});
});

Related

Retrieving "Description" from BIM 360 via API on the Folder Contents, or Item, or Versions endpoint is not possible

When retrieving Folder Contents, or Item, or Versions in BIM 360 via API, the "Description" is not included. Any thoughts or updates?
Trying to get files metadata from BIM 360 - all going well except that the files' "Description" is not included.
{
"type": "items",
"id": "urn:adsk.wipprod:dm.lineage:-YFunNGUQf-64qpgkfeGMA",
"attributes": {
"displayName": "TP9-AST-105000-BB0A-MB-AR-LOCKERS.rvt",
"createTime": "2022-03-18T11:25:27.0000000Z",
"createUserId": "DFZGQKV2NRSF",
"createUserName": "Mohammed Irfan Mirza Baig",
"lastModifiedTime": "2023-02-01T12:38:11.0000000Z",
"lastModifiedUserId": "ZNAVNEM5G6JM",
"lastModifiedUserName": "Mirna Khoury",
"hidden": false,
"reserved": false,
"extension": {
"type": "items:autodesk.bim360:File",
"version": "1.0",
"schema": {
"href": "https://developer.api.autodesk.com/schema/v1/versions/items:autodesk.bim360:File-1.0"
},
"data": {
"sourceFileName": "TP9-AST-105000-BB0A-MB-AR-LOCKERS.rvt"
}
}
},

How to display data in table using Keystone6 component in custom page so it looks same?

I have build custom page in Keystone6 using this docs
Now I am getting data from GraphQL query.
{
"members": [
{
"__typename": "Member",
"id": "ckwluj7jd1675l4l8e9yfcwtt",
"name": "User 2",
"companyName": "company1",
},
{
"__typename": "Member",
"id": "ckwltsw620162l4l88g8ox4zo",
"name": "User 1",
"companyName": "company2",
},
{
"__typename": "Member",
"id": "ckwm061f8436554l8ab4ic3dsd5o",
"name": "User 3",
"companyName": "",
}
]
}
Now I am trying to display it on custom page but I am not sure how to use Keystone6 admin component to display data.
Ronald here from the Keystone Team.
At the moment there’s no way to do this using official Keystone components. We’re working on a next-gen Admin UI in 2022 that will make it easier for you to achieve this.

Bigcommerce Stencil Common Product Card Model has_options attribute not working

According to the documentation, there is a has_options attribute on the Common Product Card Model that should return a boolean showing whether or not the product has options.
However, this value is returning false for all of my products, even though they have options. For example, if I access the homepage in debug mode via this url:
http://localhost:3000/?debug=context
One of the products under the featured products section is:
{
"id": 114,
"name": "Product Name",
"url": "http://www.example.com/product-url",
"brand": null,
"rating": 5,
"availability": "Usually ships the next business day",
"summary": "Product summary goes here",
"image": {
"data": "https://cdn2.bigcommerce.com/server2100/abcdef/images/stencil/{:size}/products/114/8086/product_image.jpg?c=2",
"alt": ""
},
"date_added": "January 6, 2014",
"qty_in_cart": 0,
"pre_order": false,
"has_options": false,
"show_cart_action": false,
"add_to_wishlist_url": "/wishlist.php?action=add&product_id=114",
"price": {
"without_tax": {
"formatted": "$19.99",
"value": 19.99
},
"rrp_without_tax": {
"formatted": "$24.99",
"value": 24.99
},
"saved": {
"formatted": "$5.00",
"value": 5
},
"tax_label": "Tax"
}
}
As you can see has_options is false. However, this product does have options. Via the control panel, I can see that it has a color swatch option. I can also see this by navigating to the products page in debug mode at http://localhost:3000/product-url?debug=context. As you can see, part of the output contains the options information for that product:
"options": [
{
"id": 498,
"type": "Configurable_PickList_Swatch",
"display_name": "Color",
"required": true,
"condition": true,
"values": [
{
"label": "Powder Coat Black",
"id": 390,
"data": [
"000000"
],
"selected": false
},
{
"label": "Anodized Aluminum",
"id": 391,
"data": [
"D9D9D9"
],
"selected": false
}
],
"partial": "swatch"
}
],
As you can see, the product does in fact have options, yet the Common Product Card Model for this product shows has_options as false.
Is there some other setting that is effecting the output of has_options? Why would it be showing false for a product that has options?
has_options is used to denote something is purchasable (true) or not (false). This is misleading and documentation will be revised to reflect this.

Instagram API and Pagination

I can't get all images using Instagram API, Pagination seems to be working somehow different and I can't understand it yet
I use request:
https://api.instagram.com/v1/users/self/media/recent?access_token=TOKEN
and can get first 20 photos:
...
{
"attribution": null,
"tags": [
"beautiful",
"instalife",
"picoftheday",
"beauty",
"instalike",
"gf",
"traveling",
"instatravel",
"vsco",
"tourism",
"\u0438\u0441\u043f\u0430\u043d\u0438\u044f",
"travelphoto",
"vscogood",
"instafollow",
"travel",
"\u0433\u0440\u0430\u043d\u0430\u0434\u0430",
"amazing",
"vscocam",
"followme",
"photooftheday"
],
"type": "image",
"location": null,
"comments": {
"count": 1
},
"filter": "Normal",
"created_time": "1442825564",
"link": "https:\/\/instagram.com\/p\/74vm3GOCEn\/",
"likes": {
"count": 18
},
"images": {
"low_resolution": {
"url": "https:\/\/scontent.cdninstagram.com\/hphotos-xap1\/t51.2885-15\/s320x320\/e15\/11934647_531283580370186_1131008999_n.jpg",
"width": 320,
"height": 320
},
"thumbnail": {
"url": "https:\/\/scontent.cdninstagram.com\/hphotos-xap1\/t51.2885-15\/s150x150\/e15\/11934647_531283580370186_1131008999_n.jpg",
"width": 150,
"height": 150
},
"standard_resolution": {
"url": "https:\/\/scontent.cdninstagram.com\/hphotos-xap1\/t51.2885-15\/e15\/11934647_531283580370186_1131008999_n.jpg",
"width": 612,
"height": 612
}
},
"users_in_photo": [
],
"caption": {
"created_time": "1442825564",
"text": "#\u0413\u0440\u0430\u043d\u0430\u0434\u0430 #\u0418\u0441\u043f\u0430\u043d\u0438\u044f #photooftheday #picoftheday #instalike #followme #vscogood #vscocam #vsco #instafollow #travel #traveling #instatravel #instalife #tourism #gf #beauty #beautiful #amazing #travelphoto",
"from": {
"username": "solotravel_me",
"profile_picture": "https:\/\/igcdn-photos-h-a.akamaihd.net\/hphotos-ak-xaf1\/t51.2885-19\/11282631_115839268762391_863189534_a.jpg",
"id": "736938591",
"full_name": "and"
},
"id": "1078821495951073761"
},
"user_has_liked": false,
"id": "1078821489441513767_736938591",
"user": {
"username": "solotravel_me",
"profile_picture": "https:\/\/igcdn-photos-h-a.akamaihd.net\/hphotos-ak-xaf1\/t51.2885-19\/11282631_115839268762391_863189534_a.jpg",
"id": "736938591",
"full_name": "and"
}
}
...
after that I'm trying use max_id parameter, but I'm not sure which ID I need to use
I tried id of the photo, photo_user id, I even tried timestamp (found this idea on some forum), but every time I receive only first 20 photos
example:
https://api.instagram.com/v1/users/self/media/recent?access_token=TOKEN&max_id=1078821495951073761
I was having the same problem with the empty pagination object while the account actually had more photos.
And just to make things clear here. This question is answered in the comments of the origial question.
There is nothing in the pagination object because the app is in sandbox mode and app's in sandbox mode never returns more than 20 posts(photos).
Use this API for getting all posts of the user:
https://i.instagram.com/api/v1/feed/user/{user_id}
For pagination, the parameter name is max_id
Pass max_id which you have returned in this API's response.
Hope this helps !!

How to get number of googleplus page followers?

is there actually a possibility to get the number of followers of my googleplus-page. the following script - which I found here in an earlier post - doesn't work (no output):
$google_api_key = 'XYZXYZXYZXYZXYZXYZ';
$page_id = 'MYNUMERICPAGEID';
$data = #file_get_contents("https://www.googleapis.com/plus/v1/people/$page_id?key=$google_api_key");
$data = json_decode($data, true);
echo $data['plusOneCount'];
thank you!
There could be a few things wrong:
Don't have an updated project on the Developer Console.
Didn't enable the API for that project.
Are past thresholds/quotas.
Try the following:
Login to your Google Developers Console
You'll need a project.
If you don't have a project, create one.
Enable "Google Plus API" on that project.
Confirm usage/quotes are within tolerance and you haven't gone past.
From there, your call should work as normal:
GET https://www.googleapis.com/plus/v1/people/{USER_ID}?key={YOUR_API_KEY}
In my case, I'm querying Google's's page, so {USER_ID} = 116899029375914044550. I can then see the plusOneCount:
{
"kind": "plus#person",
"etag": "\"RqKWnRU4WW46-6W3rWhLR9iFZQM/bTf-sq_Sg3fLAFijixPfjtKM5f8\"",
"urls": [
{
"value": "http://www.google.com",
"type": "website",
"label": "www.google.com"
},
{
"value": "http://www.google.com/support/",
"type": "other",
"label": "Google Help"
},
{
"value": "http://googleblog.blogspot.com/",
"type": "other",
"label": "Official Blog"
},
{
"value": "http://twitter.com/#!/google",
"type": "other",
"label": "#google"
},
{
"value": "http://www.google.com/about/corporate/company/",
"type": "other",
"label": "Company Info"
},
{
"value": "http://www.google.com/press/",
"type": "other",
"label": "News"
},
{
"value": "http://www.google.com/press/google-directory.html",
"type": "other",
"label": "More Google pages"
}
],
"objectType": "page",
"id": "116899029375914044550",
"displayName": "Google",
"tagline": "News and updates on Google's products, technology and more",
"aboutMe": "<p>Welcome to Google's official page. Here, you'll find product news and announcements, company updates, glimpses into what it's like to work at Google, discussions on technology and the web, and much more. </p><p><span>Given the volume of feedback we receive here, we may not be able to respond individually to every comment and we're not able to provide product support (if you're having product issues, please visit our Help Center). Rest assured we're paying attention, and we're always eager to hear from you.</span></p>",
"url": "https://plus.google.com/+google",
"image": {
"url": "https://lh4.googleusercontent.com/-v0soe-ievYE/AAAAAAAAAAI/AAAAAAAC9wQ/JD8tdz3bFTM/photo.jpg?sz=50",
"isDefault": false
},
"isPlusUser": true,
"plusOneCount": 10757884,
"circledByCount": 7692912,
"verified": true,
"cover": {
"layout": "banner",
"coverPhoto": {
"url": "https://lh4.googleusercontent.com/-PLPoXvnN0XI/UTdr4xTtuHI/AAAAAAAA_1U/p1n_Za3BZUg/s630-fcrop64=1,00000000fe06fe97/g_plus_background.png",
"height": 528,
"width": 940
},
"coverInfo": {
"topImageOffset": 0,
"leftImageOffset": 0
}
}
}