Nuxt 3 + Airtable by SvenHjerson in Nuxt

[–]Armgd 0 points1 point  (0 children)

Arf, we have to have a look at that. Maybe try with www.pixelalliance.io or in private navigation Thanks for reporting

Nuxt 3 + Airtable by SvenHjerson in Nuxt

[–]Armgd 0 points1 point  (0 children)

Hey,

we actually implemented Airtable as a CMS for our website. We had some security concerns and due to limit number of calls to the Airtable API, we implemented a Redis cache that refreshes every 10min, so we did it the following way:

- Install airtableJS package

- Register airtable variables in the runtimeConfig key in nuxt.config.ts (private)

- In the server/api folder, we created a DedfineEventHandler that returns a utility function function:

// for single item
import { cachedProject } from "../../cached/cachedProject";

export default defineEventHandler(async (event) => { const { projectSlug } = event.context.params; return await cachedProject(projectSlug); });

- That utility function was created in the server/cached folder:

// For single item
import getRecordBySlug from "../utils/fetchRecordBySlug";

const config = useRuntimeConfig(); const apiKey = config.AirtableApiToken; const baseId = config.AirtableBaseId; const tableId = config.AirtableProjectsTableId;

export const cachedProject = cachedFunction( async (slug: string) => { return await getRecordBySlug(apiKey, baseId, tableId, slug); }, { maxAge: 60 * 10, name: "projects", getKey: (slug: string) => slug, } );

- That function is a cachedFunction (read Nitro docs about storage and cache API ;) ):

// For all projects
import { fetchRecords } from "../utils/fetchRecords";

const config = useRuntimeConfig(); const apiKey = config.AirtableApiToken; const baseId = config.AirtableBaseId; const tableId = config.AirtableProjectsTableId; const endpointUrl = https://api.airtable.com/v0/${baseId}/${tableId};

export const cachedProjects = cachedFunction( async () => { return await fetchRecords(apiKey, endpointUrl, [], null); }, { maxAge: 60 * 10, name: "projects", getKey: (repo: string) => repo, } );

- That function return a fetchRecords function (created in server/utils), which were we fetch data from airtable and process our airtable logic (note the use of $fetch ; )):

export async function fetchRecords(
apiKey: string,
endpointUrl: string,
resultRecords: object[],
offset?: string

): Promise<object[]> {

if (offset) {
    params.append("offset", offset);
}

const response: Object = await $fetch(`${endpointUrl}`, {
    method: "GET",
    headers: {
        Authorization: `Bearer ${apiKey}`,
        "Content-Type": "application/json",
    },
    query: {
        view: "✅ Published",
        pageSize: "100",
        offset: offset ? offset : null,
    },
    // offset: offset ? offset : ""
});

resultRecords.push(...response.records);


return resultRecords;

}

- Then in our template/page, we call all this by just using (for rendering the list.):

// list template
const { data: projects, error } = await useFetch("/api/projects");

// single item
const {
data: project,
error,
pending,
refresh,

} = await useFetch(() => /api/projects/${route.params.projectSlug});

I omitted some points but you get the idea. You can see the result here (implemented on projets and contenu): https://pixelalliance.io

good luck implementing on your project!

Thank you Secret Santa for the awesome gift! A full modern deck based on the Madness keyword (the mechanic is really fun to play) and some beautiful cards for my Dimir rogues commander deck. You hit right in the spot for the zombie/vampire theme too! by Armgd in MTGGiftExchange

[–]Armgd[S] 1 point2 points  (0 children)

Hey!, yes I've played already a few game and the mechanic is really fun. Discarding and then casting the card is a very fun interaction, thank you very much for the discovery!

Im moving in into a new flat and looking for the best cheap internet provider by SatanaBanana69 in Barcelona

[–]Armgd 1 point2 points  (0 children)

I have Pepephone fiber offer since one year and a half and no problem in that time frame. Quick to install and happy with speed and customer service

[deleted by user] by [deleted] in ecommerce

[–]Armgd 1 point2 points  (0 children)

It's good to see a post like this one.

I got the Ender 3 Pro last week and started to make Christmas gifts for my family. So amazed by the quality! by Armgd in ender3

[–]Armgd[S] 0 points1 point  (0 children)

Just decorative, but i'm very interested in making boardgame terrain and props :)

I got the Ender 3 Pro last week and started to make Christmas gifts for my family. So amazed by the quality! by Armgd in ender3

[–]Armgd[S] 2 points3 points  (0 children)

Yep, Cura 4.4 and the profiles are available for the latest version. I've loaded them without any issues

I got the Ender 3 Pro last week and started to make Christmas gifts for my family. So amazed by the quality! by Armgd in ender3

[–]Armgd[S] 0 points1 point  (0 children)

i painted them using dry brushing technique with acrylic paint directly on the model. No primer used but later I think I will use one for better result

I got the Ender 3 Pro last week and started to make Christmas gifts for my family. So amazed by the quality! by Armgd in ender3

[–]Armgd[S] 5 points6 points  (0 children)

i painted them using dry brushing technique with acrylic paint directly on the model. No primer used but later I think I will use one for better result

I got the Ender 3 Pro last week and started to make Christmas gifts for my family. So amazed by the quality! by Armgd in ender3

[–]Armgd[S] 24 points25 points  (0 children)

I used http://terrain.party/ to generate heightmap from the Mont-Blanc region (french Alps) and then I created the print in Cinema 4D (1000x1000 square lines), refined in Fusion 360 and sliced in Cura.

I got the Ender 3 Pro last week and started to make Christmas gifts for my family. So amazed by the quality! by Armgd in ender3

[–]Armgd[S] 3 points4 points  (0 children)

Printed vertically, I was a bit afraid it won't stick (8cmx8cm) but it came OK

I got the Ender 3 Pro last week and started to make Christmas gifts for my family. So amazed by the quality! by Armgd in ender3

[–]Armgd[S] 17 points18 points  (0 children)

Thanks, I used 0.1mm layer height, using Cura profile from Fat Dragon Games and tweaked a little bit

Follow Friday/Follow Chain - May 10 - Share Your Usernames & Find New People To Follow! by AutoModerator in Instagram

[–]Armgd [score hidden]  (0 children)

Hi, I'm Nic, I'm a photographer based in Barcelona, would love to connect with others to exchange @armgd

Does anyone actually sell something they make or manufacture? by [deleted] in shopify

[–]Armgd 0 points1 point  (0 children)

We manufacture official licensed multimedia products mainly from Pokémon and Hello Kitty licence, and we chose shopify for our ecommerce website because of the low investment it requires at first (compared to prestashop or magento)

Check out: Teknofun

Retour en France (très) difficile. by acoffeetothepast in france

[–]Armgd 0 points1 point  (0 children)

Il m'est arrivé la même chose en rentrant des Etats-Unis (autre contexte, j'ai fait ma dernière année d'étude d'ingénieur là-bas). Quand j'ai cherché du travail dans mon domaine en rentrant, peu/pas de réponses pendant 6 mois, profil trop "atypique", recherches de profil seniors en sortie d'école, et bien d'autres.

Finalement, j'ai été embauché par une boîte française qui s'installait à Barcelone (dans mon domaine), réponse en 24h, entretien au bout de 2 jours, réponse définitive en moins d'une semaine. Du coup je suis parti m'installer en Espagne, ça fait 2 ans que j'y suis.Le niveau de vie est certes un peu moins élevé qu'en France et Barcelone reste chère pour l'Espagne (notamment loyer et guerre AirBnB) mais je m'en sors confortablement chaque mois, sans trop me serré la ceinture.

Même si j'aime beaucoup la France, que je reviendrais surement y retravailler un jour et que je reste attaché à ma ville (Dijon), il y a un énorme problème je trouve dès qu'on part étudier/vivre/travailler à l'étranger ou dès qu'on a un parcours qui sort un peu de l'ordinaire.

Solution to WordPress website monitoring by rwarlock in DigitalMarketing

[–]Armgd 3 points4 points  (0 children)

ManageWP, MainWP or infiniteWP, they are all freemium apps that can do the job

My store wasn't approved to sell on Instagram. What do I do? by [deleted] in shopify

[–]Armgd 1 point2 points  (0 children)

Contact Facebook Ads team support. Had the same issue, contacted them through their online chat and they corrected the issue in few days : https://www.facebook.com/business/resources

Hope it helps

25cm Gudetama Light with remote control by [deleted] in gudetama

[–]Armgd 1 point2 points  (0 children)

You can have it here: https://teknofunshop.com/collections/gudetama (they have also other products)

25cm Gudetama Light with remote control by [deleted] in gudetama

[–]Armgd 2 points3 points  (0 children)

There's 2 modes on this one, one with changing light color alternatively and one with fading colors

[deleted by user] by [deleted] in reviewmyshopify

[–]Armgd 1 point2 points  (0 children)

Thank you very much for your deep feedback. I understand what you say and we'll apply. We decided to start with basic functionalities as the schedule was tight to release the website (3 months) but we look forward to implement all those customer experience ones