Posts

Showing posts from November 19, 2018

Rest method, link with what we return

Image
up vote 0 down vote favorite I've read all best practices about Restfull API but they always use simple examples. I often read things like : GET /cars -> return all cars PUT /cars/1 -> update car with id 1 etc... So ok, we name the rest method "cars" because we're dealing with car resources. But what about "advanced operations" ? For example, I have a system where users have accounts. I want to create a GET method that allows to check if a person is linked to an account existing in database. So I can create : GET /users/1/10 -> return users data if user with id 1 is linked to the account with id 10 Is it good to name "/users" my method ? Knowing that the purpose to my method is not really to get user data but check if his account exists in databse In oth

Why won't the text color in the app bar change?

Image
up vote 0 down vote favorite the color of the text and icons in the app bar continue to be white, even though I'm trying to set them to be brown. What's wrong with my styles? <style name="HobbesActionBarStyle" parent="Theme.AppCompat.Light.DarkActionBar"> <item name="android:background">@color/HobbesBackground</item> <item name="android:tint">@color/HobbesText</item> <item name="colorControlNormal">@color/HobbesText</item> <item name="android:subtitleTextStyle">@style/Hobbes.ActionBar.CustomTitle</item> <item name="android:titleTextStyle">@style/Hobbes.ActionBar.CustomTitle</item> <item name="subtitleTextStyle">@style/Hobbes.ActionBar.CustomTit