שליחת בקשת API בתוסף

כיצד אוכל לשלוח בקשת API בתוסף, למשל כדי לשנות נתוני משתמש? רצוי ללא צורך לציין מפתח API?
תודה.

לחלופין, האם יש דרך לא להשתמש בבקשות לכתובות URL, אלא להשתמש במחלקות או שיטות מובנות (למשל, PostCreator)?

לייק 1

Read up about MVC.

Requests → Controllers → Models

Use the Rails Models.

Experiment on the rails console using models.

eg

rails c
user = User.find_by(username: "harry")
user.username = "george"
user.save!
user.username

etc etc.

This is the very basics of code that is placed in plugins.

3 לייקים

תודה! זה נראה כמו מה שאני מחפש; אני אסתכל בזה.

לייק 1